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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    81 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    149 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    79 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    52 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    59 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X