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 businessman1929, 04-29-2024, 01:28 PM
              2 responses
              21 views
              0 likes
              Last Post businessman1929  
              Started by bltdavid, 03-27-2023, 05:32 AM
              18 responses
              346 views
              0 likes
              Last Post ETFVoyageur  
              Started by NM_eFe, Today, 05:15 PM
              0 responses
              4 views
              0 likes
              Last Post NM_eFe
              by NM_eFe
               
              Started by vitaly_p, Today, 05:09 PM
              0 responses
              3 views
              0 likes
              Last Post vitaly_p  
              Started by cmtjoancolmenero, Today, 05:05 PM
              0 responses
              2 views
              0 likes
              Last Post cmtjoancolmenero  
              Working...
              X