Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Candle body size

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

    Candle body size

    I am trying to build a strategy where a condition of entry is previous bars must have a minimum body length. In other words the open to close is a minimum of ticks. I have tried this
    using the strategy wizard,
    Close[1] +8 * TickSize>Open[1]
    Close[2] +8 * TickSize>Open[2]
    I am thinking this means the close of the previous bar plus 8 ticks is greater than the open of the previous bar etc. I am using this in a short strategy. It's not working as I intended. My intention is to keep out of consolidation areas. I would love to find out what my error is, also if there is an alternate way to get the same results.

    Thanks

    #2
    Hello snotrag12,

    The logic that you have is going to be adding 8 Ticks to the Close price and seeing if it is greater than the open, which would not be quite what you would like. Example of ES: Close[1] Price is 1600 Open[1] Price is 1602.25.

    Close[1] +8 * TickSize = 1602 which is not greater than Open[1] 1602.25.

    For something like this you would need some custom coding or create an Indicator that calculates the Body size for you like the Range Indicator (note the Range Indicator takes the High-Low).
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by snotrag12 View Post
      I am trying to build a strategy where a condition of entry is previous bars must have a minimum body length. In other words the open to close is a minimum of ticks. I have tried this
      using the strategy wizard,
      Close[1] +8 * TickSize>Open[1]
      Close[2] +8 * TickSize>Open[2]
      I am thinking this means the close of the previous bar plus 8 ticks is greater than the open of the previous bar etc. I am using this in a short strategy. It's not working as I intended. My intention is to keep out of consolidation areas. I would love to find out what my error is, also if there is an alternate way to get the same results.

      Thanks
      Your code is doing what you think it should.

      If your logic is not doing as you expect, then you need to clarify your logic. Write down in language what you want to do. After that the coding is usually no longer a difficult issue.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X