Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Length of a candle

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

    Length of a candle

    hi, i'm making a strategy and i want the entry to be made when the length of the candle is defined by the user. How do I measure the length of the previous candle and know if it could be a market entry candle? Thank you

    #2
    Hello jerryblack,

    Thanks for the post.

    By length of the candle do you mean Time it took to complete or the Difference between high and low?

    The user input part is very easy, that can be created by the strategy builder in the user inputs section. Depending on the condition you are looking for would determine what Type the user input is.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks for answering

      I want to choose the type of candle, which is a large candle and with intention

      Comment


        #4
        Hello jerryblack,

        What makes the candle large? Are you referring to the difference in prices between the low and high? For example this candle was large because it had X amount of difference between low and high?

        I look forward to being of further assistance.

        Comment


          #5
          yes exactly, I want to measure it and put it in a variable to tell the strategy if it is the correct candle to enter or not

          Comment


            #6
            Hello jerryblack,

            You could calculate that by using the following syntax:

            Code:
            double length = High[1] - Low[1];
            This would give you the price difference whihch you could then use in a condition. Assuming you have a user input called InputPrice it would look like the following:

            Code:
            if(InputPrice > length)
            {
            
            }
            I look forward to being of further assistance.

            Comment


              #7
              thanks a lot

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              80 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              40 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              64 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              66 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              54 views
              0 likes
              Last Post CarlTrading  
              Working...
              X