Pips condition above or below EMA to trigger an order

Forums ProRealTime English forum ProOrder support Pips condition above or below EMA to trigger an order

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • #81668

    Hi,

    my expert has 2 EMA: 36 and 12.

    When  12EMA cross over or under 36EMA and price go away from 36 about X=number of pips and then return and touch 12EMA:

    Open long if 12 EMA cross over 36 EMA and price go away X numeber of pips.

    Open short if 12 EMA cross under 36 EMA and price go away X numeber of pips.

    Could you write me how can I code that price have to go away for example 30 pips from EMA 36???

    Thanks

     

    #81727

    The below code should trigger the orders as per your description.

     

    1 user thanked author for this post.
    #81780

    Grazie Nicolas,

    puoi aiutarmi ancora?

    La condizione dei 30 pips ci deve essere dopo che è avvenuto l’incrocio della 12 con la 36, e questo è ok.

    Ma per aprire un trade short o long il prezzo una volta superato il limite dei 30 pips deve tornare indietro, toccare la ema 36 ed il trade si apre ad apertura candela successiva al tocco.

    #81781

    Sorry, please write in English.

    #81783

    Thanks, Nicolas

    can you help me again?

    The condition of the 30 pips must be there after the crossing of 12 with 36 has occurred, and this is ok.

    But to open a trade short or long the price once exceeded the limit of 30 pips must go back, touch ema 36 and the trade opens at the opening candle next to touch.

    #81886

    I don’t understand since this is what the code does actually. By “touch ema 36”, do you mean a new crossover ? Or a single touch ? and the trade should open in what direction ?

    1 user thanked author for this post.
    #82067

    If I have a cross over this is level=0, price have to move level+30pips, then price have to return down and touch EMA36, after touch I open a long trade.

    If I have a cross under this is level=0, price have to move level-25pips, then price have to return up and touch EMA36, after touch I open a short trade.

    #82233

    Ok, so that’s almost completely different, the below code should work as intended:

    I added takeprofit and stoploss values, otherwise the first trade will never end! 🙂

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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