Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

candle range measurement help

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

    candle range measurement help

    Hi all!

    I just want to automatize a system to measure the size of a candle, and take a trade based on it.
    I tried with the indicator named "range" to help me measure the size of the candle, but i don't know how to continue. I want the SL to be 2pips under the low of the candle and the TP for example at 20pips.
    If someone can help me with an example, a tutorial, or a file, i will be reall glad about it.

    Thanks for your help

    #2
    Does something like High[0] - Low[0] work for you?

    Comment


      #3
      Hello Josker1,

      Thank you for your post and welcome to the forums!

      Yes, StockFundoo is correct that High[0] - Low[0] will give you the Range of the candle.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Yeah, but in the operator list, there is no minus, only <,> <=, etc. Or am i misunderstanding something?

        Comment


          #5
          myrange = High[0] - Low[0];
          Print(" myrange: " + myrange);

          Hope this works.

          Comment


            #6
            Thanks stockfundo for you answer.
            But i'm not programming manually the strategy, i'm using the strategy builder of ninjatrader

            Comment


              #7
              ok, just paste this code in your "onbarupdate" function. You will see the code after your finish the wizard.
              It should work

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Mindset, 04-21-2026, 06:46 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              144 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              71 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by cmoran13, 04-16-2026, 01:02 PM
              0 responses
              125 views
              0 likes
              Last Post cmoran13  
              Started by PaulMohn, 04-10-2026, 11:11 AM
              0 responses
              79 views
              0 likes
              Last Post PaulMohn  
              Working...
              X