Pinescript Problem with Calc after order filled and calc on every tick for backtest. there are a lot of entries on same bar which destroy the backtest

Viewed 16

I would like to know if someone has found a solution to counter this horrible calculation from tradingview:

  1. when Calc on every tick is selected only, the numbers of trades in backtesting seems correct, BUT because it doesn't calculate a supplementary intra-bar it really often misses the correct stop loss price. It closes at the close of the next bar after entry. so it destroys the backtest results calc on everytick intrabar stoploss problem example image

  2. when "calc after orders filled" is enabled, it solves the problem of the stop loss BUT it is starting to make completely WTF entries, sometimes on Wick or Open bars which is increasing the number of trades in an unrealistic way. entry on wick example image

  3. if calc after order filled is enabled + Bar magnifier = LITERALLY THE HELL It's starting to add an infinite number of trades on the same bar sometimes Calc after order filled + Bar Magnifier example image

So please if someone found a solution to these problems it would be incredible.

1 Answers

Same over here brother. I was just looking for help with limit entry orders getting activated on a signal and they seem to enter on bar close. I tried every combination of those settings too, sometimes they work sometimes they dont i guess. I dont know how to help you but if there's a solution would benice. Maybe place a support ticket to trading view.

Related