Heikin Ashi candlestick body and moving average condition

Forums ProRealTime English forum ProOrder support Heikin Ashi candlestick body and moving average condition

Tagged: 

Viewing 9 posts - 16 through 24 (of 24 total)
  • #80991

    Hello Nicolas,

     

    Before to test this strategy I’d like to understand what “xClose” is standing for..

     

    Can you explain?

     

    Thank you one more time…!

     

    #80996

    For information here’s what my code looks like:

    What I don’t get is the clos and why it keeps opening position 1 bar “too late”, is there a way to make it one bar before for the entry?

    #81000

    xClose is the variable that hold the HeikinAshi candlestick Close value.

    Positions are not opened too late: code is read at Close, positions are opened at next bar Open.

     

    #81001

    Ok so waht is the xOpen standing for? The previous candle opening?

    #81002

    xOpen is the variable for the Heikin Ashi Open value.

    HeikinAshi candlesticks are smoothing the price, that’s why they give different values than the real price and therefore need to be calculated.

    #81010

    I get it but why calculate xClose and not xOpen then?

    #81011

    To be precise, the only point I don’t get is this calculation:

    What is it calculating?

    #81012

    “Green” is a condition showing when the current candle is above the previous candle

    “harange” is calculating the abs value of an evolution

    So when you write:

    It returns “Green” but on previous candles right?

     

     

    #81015

    I get it but why calculate xClose and not xOpen then?

    To be calculated xOpen need at least 1 xClose, that’s why we wait 2 barindex before its calculation:

    “Green” is a condition showing when the current candle is above the previous candle

    No. Green is a boolean condition to test if xClose is superior to xOpen (a green Heikin Ashi candle), if it is true, green=1.

    I strongly recommend you to watch the training videos for programming, the first course is free 😉

    harange>harange[1] is testing if the current range is superior to its previous one, like the way you want in your initial request. Number in brackets is an offset in the past.

     

Viewing 9 posts - 16 through 24 (of 24 total)

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