Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order entry when price hits ema

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

    Order entry when price hits ema

    Hello,

    I've watched the 'Automate Your Trading Strategy' video and have looked through the help topics but have not been able to figure out how to, in the strategy builder, enter a position when the price hits an ema. I want a bar to close below an ema and then enter a long position when the price comes back up and touches the ema. If you can explain this to me or direct me to where to find the info that would be great.

    Thanks,
    mw355

    #2
    Hello mw355,

    You could use a bool variable for that purpose. Making a variable with a default value of false and then checking if the price crosses below the EMA would be how to set up this type of logic. If we assume the starting value is false and use a set to turn that to true based on the close crossing below the EMA that is half of the steps. In a second set you can check if the bool variable is true and also if the close is greater equal to the EMA. As long as the price is below the ema and the bool is true the order is not submitted, once the price crosses above it would be submitted. As you submit the order you would also need to set the bool variable to false to repeat the process.

    Comment


      #3
      Hello Jesse,

      Okay, thank you for the response.

      mw355

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      93 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      138 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
      123 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      73 views
      0 likes
      Last Post PaulMohn  
      Working...
      X