How to set a stop loss at low or high of 2 previous Heikin Ashi

Forums ProRealTime English forum ProOrder support How to set a stop loss at low or high of 2 previous Heikin Ashi

Viewing 3 posts - 1 through 3 (of 3 total)
  • #22812

    Dear all,

    I’m trying to set a stop loss 2 pips under or 2 pips above the high at 2 prevoius bar of a Heikin Ashi.

    I found something on the forum but it was talking about normal candles and not HA. I tried to adapt it to HA but it is not working as expected.

    I want the stop loss NOT to change at next bars.

    Here’s the code of Heikin Ashi I use:

     

    To enter long:

     

    to enter short:

     

    finally to set stop loss:

     

    Here what happen:

    1. When it has to close long position looks not bad even if it sometimes the exit from position it’s lower then xlow[3], so I do not understand if it sell as soon as the price reach xlow[3]+2pipsize or it waits the bar where it reaches it to close.
    2. When it has to close short position it opens a countrary long position, so I found myself with a opened long postion which I don’t need. Regarding point where it closes the short position the issue is as above at point 1.

    I really appreciate your help!

    Thank you all!

    #22839

    To close short position, you have to use EXITSHORT instruction, not BUY which is already made to go long on market.

    #22877

    Thank you Nicolas

    that was it! i’ve done some other changes and now it’s working as it should!

    Thank you again!

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

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