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 DannyP96, 05-18-2026, 02:38 PM
              1 response
              23 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 05-11-2026, 05:56 AM
              0 responses
              115 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 05-10-2026, 08:12 PM
              0 responses
              68 views
              0 likes
              Last Post CarlTrading  
              Started by Hwop38, 05-04-2026, 07:02 PM
              0 responses
              222 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Started by CaptainJack, 04-24-2026, 11:07 PM
              0 responses
              406 views
              0 likes
              Last Post CaptainJack  
              Working...
              X