Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Squeeze Momentum Indicator to filter noise

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

    Using Squeeze Momentum Indicator to filter noise

    I made a trend following strategy that works well in trending markets, but loses money when the market is in consolidation mode. My idea is to enter long or short when there "Is"Squeezes". For long trades - above the 0 line and green, for short- below the 0 line and red.
    Do you think this is the appropriate solution? Any other ideas how to avoid chop?

    // Set 1
    if (CrossAbove(SqueezeMomentumIndicator1.SqueezeDef, SqueezeMomentumIndicator1.IsSqueezes, 1))
    {
    EnterLong(Convert.ToInt32(DefaultQuantity), "");
    }

    // Set 2
    if (CrossBelow(SqueezeMomentumIndicator1.SqueezeDef, SqueezeMomentumIndicator1.IsSqueezes, 1))
    {
    ExitLong(Convert.ToInt32(DefaultQuantity), "", "");
    }
    Attached Files
    Last edited by NellyN; 11-20-2022, 10:47 AM.

    #2
    Hello NellyN,

    Thanks for your post.

    The code you shared would check if the SqueezeDef plot of the SqueezeMomentumIndicator script crosses above the IsSqueezes plot and calls EnterLong() to place an order.

    It also checks if the SqueezeDef plot crosses below the IsSqueezes plot and calls ExitLong() to exit your position.

    That said, I cannot say for certain how exactly your script would function. You would need to test your script to see exactly how it performs based on your overall goals.

    Note that you could consider using Greater Than/Less Than comparisons instead of CrossAbove/CrossBelow.

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 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
    119 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