How to exit in the next period if at profit target

Forums ProRealTime English forum ProOrder support How to exit in the next period if at profit target

Viewing 4 posts - 1 through 4 (of 4 total)
  • #6850

    Hi,

    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.

     

    Thanks! I really appreciate it!

    Here is the code I have currently..

     

    #6852

    sorry I think there was a problem with the code… Just to be sure

     

    #6885

    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.

     

    #7145

    Awesome thanks Nicholas for your help.

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login