Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How can I include "flat" MA conditions in strategy?
Collapse
X
-
Sorry I don't follow you - if the slope is a consideration for an entry signal, then it would automatically not take any trades in your designated MA flat area, as simple no condition for entry would evaluate to 'true' and thus trigger an entry into the market by your strategy. You don't have to tell it not to enter, it would not enter if none of the conditions triggered.
-
Hi Bertrand,
The flat ma slope conditions are not entry signals, they are the opposite. They are signals not to trade:
Entry signal:
if (ZeroLagTEMA(ZLTEMA).ZeroTEMA[0] >ZeroLagHATEMA(ZLHATEMA).ZeroHATEMA[0]
&& Position.MarketPosition == MarketPosition.Flat
&& (Rising(anap)
&& Close[0] > ZeroLagHATEMA(ZLHATEMA).ZeroHATEMA[0]))
GoLong();
Signal NOT to trade:
if (Slope(anaHoltEMA(80, 20).HoltEMA, 5, 0) < 0.00091
&& Slope(anaHoltEMA(80, 20).HoltEMA, 2, 0) > -0.003)
Comment
-
Shadowshorter, you would need to include your Slope condition in the entry, otherwise it would not work as filter, a signal not to take a trade is no signal...
if (Slope(anaHoltEMA(80, 20).HoltEMA, 5, 0) < 0.00091
&& Slope(anaHoltEMA(80, 20).HoltEMA, 2, 0) > -0.003)
Change the thresholds / comparisons for the slope so you filter for the slope conditions that would allow an entry then, so inverse basically of your current logic.
Comment
-
Hi Bertrand,
I was trying this but I can't seem to find the opposite settings to my ma flat conditions.
Will keep trying, thanks for all your time, you've been very helpful
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
640 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment