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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X