Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

200 sma to filter out long and short entries.

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

    200 sma to filter out long and short entries.

    I have very simple moving average entry and exit strategy. I would like to add a extra filter of only taking longs above and shorts below the 200 sma. so the first condition has to be met then follow with the entire signal. much appreciated your help.

    #2
    Hello geo123,

    Thank you for your post.

    Is this a strategy built in the Strategy Builder or are you working with an unlocked strategy in the NinjaScript Editor? Depending on how you are developing the strategy, I'd be glad to provide you with some examples that could help you set up your conditions the way that you have described.

    I look forward to your reply.

    Comment


      #3
      Hi Emily, The strategy is in builder very simple price crossing and EMA I am looking to
      filter out the long trades when price is below the 200 and short trades when price is above the 200.

      Comment


        #4
        Hello geo123,

        Thank you for your reply.

        The Strategy Builder allows you to set conditions that make indicator to value comparisons, as demonstrated here:


        You could choose the EMA on the left and then on the right-hand side you could select Misc > Numeric value and set that to 200. You would need separate sets for long and short; one would check if the EMA is greater than 200, and the action would be to submit the short entry and the other would check if the EMA is less than 200 and have the action to submit the long entry.

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        56 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        33 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        195 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        359 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        280 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X