I am wanting to create a code so that the profit target must be reach in the next period.
I am having problems with the backtesting showing that a trade was successful because the trigger bar was long enough that the profit target was within the trigger bar, even though the market didn’t trade there after the order was triggered.
It’s a common “problem” with the tester. Because each conditions are only tested once per bar, the tester don’t have any idea of when the price has reach your short or long levels limit. And if your stoploss and takeprofit prices were include in the same bar, tester consider the takeprofit firstly.
Also, when you use pPROFIT ou pLOSS you are defining point values, like 15 points for 0.0015 pips for forex pairs for example.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok