Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

max consecutive long/short bars in wizard

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

    max consecutive long/short bars in wizard

    Hi using the strategy wizard in a 20 Range chart, I'm trying to calculate something like "IF there's at least one bar that closed green in the last 4 bars, go ahead and enter short".

    Another way to put it would be "IF there's a max of 3 bars that have closed below their respective previous bar's close in a row, go ahead and short. If there's more than 3 in a row, cancel".

    I was thinking some indicator related to bar colors could work, but haven't been successful at it.

    Thanks a lot!

    #2
    Hello mmetry,

    Thank you for your note.

    You can use the NBarsDown indicator with a BarCount of 4 to check if the last 4 bars are down bars, if not it will return a value of 0 if it is true it will return 1.
    So we can say if NBarsDown == 0 then go short.
    We will need to setup a User defined input of 0.

    I have created a video demonstrating how to setup this condition and action. You may view this video at the following link: http://screencast.com/t/QPjojpslD

    Please let me know if you have any questions.

    Comment


      #3
      Worked like a charm. Very nice idea to throw an example screencast in there too, much appreciated!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 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
      569 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