Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to specify Candle Wick Size in Strategy Builder

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

    How to specify Candle Wick Size in Strategy Builder

    I've not played with the offsets before, am doing so now but not doing it correctly.

    Objective:

    Specify a minimum wick length, in this case seeking a minimum of 4 ticks in length.

    Example:

    I have a down candle, and I want the wick to be 4 ticks above the open of the candle.

    I have a down candle, and I want the wick to be greater= 4 ticks above the open of the candle.


    Currently I have the following conditions:

    Default Input [0] < Open [0]

    High [0] > Open [0]

    In the properties dialog of High [0] > Open [0], how do I properly set the condition for the ticks I'm after, and on which side of the statement, High or Open?


    Thank you
    JM

    #2
    Hello johnMoss,

    Thanks for your post.

    You could consider creating a condition that checks if the High price is greater than or equal to the Open price with an offset of 4 Ticks (High[0] >= Open + 4 * TickSize) and checks if the Open price is greater than the Close price (Open[0] > Close[0]).

    To set an offset for the Open price, you would select the Open price (Price folder > Open) and in the Offset section, you would set the drop-down menu to 'Ticks' and set a value of 4. See the attached screenshot.

    See this help guide for more information: https://ninjatrader.com/support/help...setAnItemValue

    Let us know if we may assist further.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Ah.. Thank you... That's what I did, just had it on the wrong side. GTG ...

      Comment


        #4
        Originally posted by NinjaTrader_BrandonH View Post
        Hello johnMoss,

        Thanks for your post.

        You could consider creating a condition that checks if the High price is greater than or equal to the Open price with an offset of 4 Ticks (High[0] >= Open + 4 * TickSize) and checks if the Open price is greater than the Close price (Open[0] > Close[0]).

        To set an offset for the Open price, you would select the Open price (Price folder > Open) and in the Offset section, you would set the drop-down menu to 'Ticks' and set a value of 4. See the attached screenshot.

        See this help guide for more information: https://ninjatrader.com/support/help...setAnItemValue

        Let us know if we may assist further.
        hejo!

        for me, I wanted to set this in per cent, as in:

        if the wick size is XX% bigger than the body size, change the bar colour.

        it does not change any colour if I set it to per cent offset.
        u have an idea?

        Comment


          #5
          Hello cryptobyrd,

          Thanks for your note.

          If the bar color changes when using a tick offset but does not change when using a percent offset, it is likely that the condition to color the bar is not becoming true.

          If the script is not behaving as you expect it to when using a percent offset, you would need to add prints to the strategy to understand how it is calculating and behaving.

          In the strategy, add prints to the script (Actions > Misc folder > Print) that print out the variables being used in the conditions along with the time of the bar to determine how the script is behaving.

          Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

          Below is a link to a forum post that demonstrates how to use prints to understand behavior.
          https://ninjatrader.com/support/foru...121#post791121

          Let me know if I may assist further.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          70 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          143 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          76 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          47 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          51 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X