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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue