Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Master Candle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Master Candle

    Hello,

    I'm trying to develop and indicator that with will draw a master candles. The definition that i gave a master candle is, it should contain a minimum of 3 candle inside it. (please refer to the attachment)

    I developed an indicator where it will identify even if one candle is contained inside. Can someone please help me modify this script so that i've an option to define the number of candle it should be contain before it is identified as a master candle?


    Thank you,
    babi.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    I looked over the code and I see the logic you are using. I am unsure there is a simple solution that I could just recommend.

    It seems you have the logic to detect an occurrence of the pattern but would likely need to alter your logic to include some sort of check to see how many bars are included or add more to the condition to only detect occurrences that have 3 bars.

    If the current code does what you need for 1 candle, you could in theory duplicate the logic and change it accordingly for the other two candles. Again this is not something I can directly translate into syntax for you as this would deal directly with the logic you are using. You will likely need to test and experiment to get the result you need.

    I am unable to see a direct solution for this question without re working the logic being used, for this item you will likely need to come up with a plan on what the logic needs to check for to qualify as 3 candles and not just 1. Once you have this, it would be easy to replicate it through the entire series of bars but would require you to think up the initial logic that needs to be used.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X