Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Newbie Question - How do I prevent more than one entry per candle?

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

    Newbie Question - How do I prevent more than one entry per candle?

    I'm working on a strategy that sometimes reaches its profit target on the entry candle. As soon as the profits are taken the strategy initiates another position (the entry conditions are still true). How do I limit the strategy to one position per bar?
    Thanks.

    #2
    Hello Cliffg26,

    You can use BarsSinceEntryExecution for that purpose.



    This reports -1 if no entry had been placed yet, after the first entry it will report a number of bars since the last entry. The condition shown in the help guide would be the requirement to check for both -1 and then the number of bars you wanted to wait for another entry. That allows it to take an initial entry to start working.

    Comment


      #3
      That should help. Thanks very much.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      66 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      141 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