Wicks

Viewing 12 posts - 1 through 12 (of 12 total)
  • #147852

    Hi

    How do I write the code if I want too identify wicks on previous Heiken-Ashi candle? I want too be able too identify if previous  red Heiken has no wick on the upper side and if previous green Heiken has no wick on the lower side.

    #147855

    There you go (not tested):

    RED is the current candle, RED[1] is the previous one, RED[2] is the second previous one, and so on….

    The same is true for GRREN candles.

     

    1 user thanked author for this post.
    #147857

    Thanks, where do I put the [1] too get the previous Heikin?

    #147858

    The way I did.

    1 user thanked author for this post.
    #147861

    Im totally off.. how does the code look with the previous candle?

    #147868

    As I said, RED is the current candle, RED[1] is the previous one, RED[2] is the second previous one, and so on….

    You need to watch some videos about programming at https://www.prorealcode.com/programming-with-prorealtime/, or at https://www.prorealtime.com/en/videos_tutorial-trading and on the ProRealTime’s YouTube channel.

    Moreover, reading documentation at https://trading.prorealtime.com/en/programming-help and some of the thousands of code examples in this forum may further help.

    We cannot take a complete course post after post!

     

     

    1 user thanked author for this post.
    #147871

    Tnx, I can agree that i must learn more. But anyway, thanks for the support.

    #147875

    You have everything in Roberto’s code.

    Here a version that you can put under your chart with “barchart” for green and red parameters  OR on your graphs with arrows for No-Wicks candles.

     

     

    1 user thanked author for this post.
    #222153

    You have everything in Roberto’s code.

    Here a version that you can put under your chart with “barchart” for green and red parameters OR on your graphs with arrows for No-Wicks candles.

    Hi Roberto, Luciole – I have tried to programme on arrow, alert when RED crosses over Green and vice versa i.e. when open trying to go over last bar with no wicks and vice versa for down, but not working as I might need to loop, also to calculate points /pips from last arrow/alert on either side, which I am not able to do, please can you help?

    //minCandles = 1
    //
    once xOpen = open
    xClose = (open + close + high + low) / 4
    if barindex > 0 then
    xOpen = (xOpen + xClose[1]) / 2
    trigger=xOpen
    endif
    xLow = min(low,min(xClose,xOpen))
    xHigh = max(high,max(xClose,xOpen))
    xpip=xHigh-xLow
    //xTypic = (xHigh + xLow + xClose) / 3
    //xMed = (xHigh + xLow) / 2
    //xRange = xHigh – xLow
    Bullish = xClose > xOpen
    Bearish = xClose < xOpen
    Red = Bearish AND (xOpen = xHigh)
    Green = Bullish AND (xOpen = xLow)
    c1=Bullish crosses over Red
    c2=Green crosses under Red

    if c1 and trigger then
    drawarrowup(barindex,lowest[3](low)) coloured(0,255,51)
    //DRAWTEXT(xpip,barindex,highest[8],Dialog,Bold,5) coloured(“Green”)
    endif

    if c2 and trigger then
    drawarrowdown(barindex,highest[3](high)) coloured(102,102,102)
    endif

    return c1 or c2

     

    #222156

    I think I sorted the 1st issue with crosses under and over. Now I am getting the right alert.

    Still need help with calculating number of points from last top or bottom to current price, it’s difficult to get around on my own, please help?

    #222158

    never mind, all sorted now,, thanks!

    1 user thanked author for this post.
    #223329

    @amitoverseas40, how did you to have the arrows on the right place? Thanks in advance

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

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