Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Avoiding Buy triggers near resistance
Collapse
X
-
Avoiding Buy triggers near resistance
I was trying to come up with a way to create a strategy so that buys are avoided near strong resistance areas. Im noticing that is a weakness in my strategy. Its seems this would be difficult to do. Was thinking to have the program automatically create resistance lines based on certain criteria and have it avoid purchases within a certain distance of the resistance line. Anyone have any pointers for acheiving this or has successfully created a method for this type of strategy?Tags: None
-
zachj, I would not be aware of a full example strategy for this type of filtering already available, but generally as idea you could structure it like the below : this would take the daily Pivot point as sup / res value and have a no trade entry zone around it of 4 ticks...
Code:protected override void OnBarUpdate() { if (CrossAbove(SMA(Fast), SMA(Slow), 1) && PivotEntry()) EnterLong(); else if (CrossBelow(SMA(Fast), SMA(Slow), 1) && PivotEntry()) EnterShort(); } private bool PivotEntry() { double pivot = Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 1).PP[0]; if (Close[0] > pivot + 4 * TickSize || Close[0] < pivot - 4 * TickSize) return true; else return false; }
-
Ok thanks. I was reading about the Pivot command in the guide but I don't see how exactly the Pivot point is calculated, does it take the average price over a certain period or something to that effect?
I assume you can have it print the resistance line with a print command somehow?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 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