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 traderqz, Today, 12:06 AM
              6 responses
              12 views
              0 likes
              Last Post traderqz  
              Started by Skifree, Today, 03:41 AM
              3 responses
              12 views
              0 likes
              Last Post Skifree
              by Skifree
               
              Started by traderqz, Yesterday, 09:06 AM
              5 responses
              33 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by guillembm, Today, 11:25 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by owensd, 04-21-2024, 11:34 PM
              9 responses
              34 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X