Very basic indicator from ninjatrader about candle patterns detection

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #92670 quote
    carlo__
    Participant
    Average

    Hello,

    I would request for a conversion of the simple indi attahced. It’s a sort of candle-pattern detection.

    I would use it on x-ticks time&sales, so please convert it for that kind of chart.

    Thanks

    BMDRotationDecisionCandle.zip rotation-decision-candle.png rotation-decision-candle.png
    #92816 quote
    Nicolas
    Keymaster
    Master

    Are these candle-patterns similar to the ones that you asked for in this other topic? https://www.prorealcode.com/topic/4-candlestick-pattern-detection/

    If yes, please don’t double post.

    Next time you asked for a code conversion, please use the page: Ask for a free code conversion

    Next time please speak Italian in the italian forum or post in the English forums..

    For your next post, please take time to write a more descriptive topic title.

    Please respect some basic rules to give us more time to code than to manage/fix your posts.

    #92822 quote
    carlo__
    Participant
    Average

    Totally different. They are 2 different patterns. Additionally the other one works on classic time-based chart. This one on tick-based chart.

    I fixed language on the english forum.

    #92825 quote
    Nicolas
    Keymaster
    Master

    Ok, fine, even if I would expect a “sorry” in one of your sentences 😐

    Anyway, I will have a look at that code asap.

    #92827 quote
    Nicolas
    Keymaster
    Master

    Here is the code you requested to be translated from Ninjatrader:

    // --- settings 
    MaintainPercentageOfOwnVolume = .50
    TakeOutPercentageOfPreviousBarsVolume = .50
    DoesntTradeMoreThanPercentageFromOpen = .20
    BarMustBeAtLeastThisPercentageOfATR = .85
    // --- end of settings 
    
    result = 0
    prevrange=range[1]
    if((range * MaintainPercentageOfOwnVolume) < (Close[0] - Low[0])) then // maintain 50% of own volume
    if(Close[0] > Low[1] + (prevRange * TakeOutPercentageOfPreviousBarsVolume)) then // takes out 50% of previous bars range
    if((Open[0] - Low[0]) < range * DoesntTradeMoreThanPercentageFromOpen) then  // doesn't trade more than 20% of own range lower than open
    result = 1 
    endif
    endif
    endif
      
    if((range * MaintainPercentageOfOwnVolume) < (High[0] - Close[0])) then // maintain 50% of own volume
    if(Close[0] < High[1] - (prevRange * TakeOutPercentageOfPreviousBarsVolume)) then  // takes out 50% of previous bars range
    if((High[0] - Open[0]) < range * DoesntTradeMoreThanPercentageFromOpen)then // doesn't trade more than 20% of own range lower than open
    result = -1
    endif
    endif
    endif
    
    
    //final cut  
    if(range < (AverageTrueRange[20](close) * BarMustBeAtLeastThisPercentageOfATR)) then 
    result=0
    endif
    
    if result = 1 then 
    drawcandle(open,high,low,close) coloured(0,0,0) bordercolor(0,255,0)
    elsif result = -1 then 
    drawcandle(open,high,low,close) coloured(139,0,0) bordercolor(255,69,0)
    endif 
    
    return

    Would be nice to explain how you use it ? Thanks in advance.

    bdm-rotation-decision-candle.png bdm-rotation-decision-candle.png
    #92829 quote
    carlo__
    Participant
    Average

    Thanks. May i know how it mark the pattern? Some arrows or anything else?

    I used the pattern as trigger in confluence with swing structures and fibonacci ratios.

     

    Thanks

    #92830 quote
    carlo__
    Participant
    Average

    Ok i reply to myself. I can see the pattern easily. Just please tell me how to fix the colour of the candlepattern wicks, because they’re a bit hard to see if the desk space is coloured white

     

    Thanks

    #92831 quote
    Nicolas
    Keymaster
    Master

    The patterns are marked the same as in the indicator you provided, the candlesticks are colorized.

    You can change the color with R,G,B format at lines 33 and 35.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Very basic indicator from ninjatrader about candle patterns detection


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
carlo__ @carlo__ Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Nicolas
6 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/01/2019
Status: Active
Attachments: 3 files
Logo Logo
Loading...