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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
61 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment