STOP not executing on first trade forward test

Forums ProRealTime English forum ProOrder support STOP not executing on first trade forward test

Viewing 5 posts - 1 through 5 (of 5 total)
  • #18786

    Hi

    I have the below code below that simply sets a stop based on the ATR when either in a long or short position. I have been forward testing on MY IG demo account since back testing does not give reliable results.

    The strategy works on a daily time frame on the South African TOP 40 index. The thing I find very strange is that it does not set the stop on the first trade, only on the second trade does it set the stop, Why is this?

    Am I the only person to experiencing this or is this peculiar to prorealtime?

     

    #18815

    Do these lines of codes are written before or after the BUY/SELLSHORT instructions?

    #18835

    Hi Nicolas

    After the BUY and SELLSHORT instruction.

    I was wandering whether it should be enclosed within the BUY or SELLSHORT instruction.

    Regards

    Ian

    #18840

    You can try to make a new variable named “stoploss” for instance, and give it the value of your calculated SL points (make it different when you initiate your orders BUY and SELLSHORT).

    Then, later in the code, add the SET stop loss line as is:

     

    #18873

    Ok .  So if I understand correctly I will set the variable  in the buy or sellshort instruction and later in the code use the stop loss  command using the variable originally set  in the buy or sellshort command.

    Thanks, I will give it a try.

    Regards

    Ian

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

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