Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limiting trade execution to only first time of session, if possible?

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

    Limiting trade execution to only first time of session, if possible?

    Is it possible to limit a trade execution to only happen the first time it appears in a session? For example If using the (current day OHL) indicator and price is below the Open and comes up and touches the open I want to sell short, however if it touches that line again later in the day I do not want the strategy to execute a trade.

    Not sure this is possible if so I have a few different ideas I would like to try. Thanks in advance for any help. Very new to the strategy building.

    #2
    You can do this by creating a bool type variable that would be set True initially. The bool would be part of the entry conditions. When the first entry occurs you can set the bool false so that the entry conditions are no longer true and further touches/crosses would not generate an entry condition. You will want to "reset" the bool to true and you can do this when the condition of First bar of session is true.

    Reference:




    Comment


      #3
      Hi James, thanks for posting. Thank you for the answer too Tasker-182

      I agree with the use of bools that tasker suggested. You can make a boolean variable in the inputs and variables section, defaulted to true. Then you can use it as a flag in your entry condition and set it to false once the condition becomes true e.g.

      Kind regards,

      -ChrisL
      Attached Files

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      46 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      66 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X