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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,609 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    6 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    16 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X