protected override void OnBarUpdate()
{
if (CrossAbove(rsi,30,1)
LE=EnterLong();
}
protected override void OnExecution(IExecution execution)
{
if (LE!=null && execution.Order.Token==LE.Token)
{
LE2=EnterLongLimit(entryprice-2points);
LE3=EnterLongLimit(entryprice-4points);
}
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multiple Entries Issue
Collapse
X
-
Multiple Entries Issue
I am writing a strategy that will allow multiple signals in the same direction. For example I want to buy EVERYTIME the RSI crosses over 30 and sell EVERYTIME it crosses under 70. Now when one of these entries occur, I also have subsequent entries. Say I want to add (up to 2 positions) every 2 points the market moves against me. So my code looks as follows.
This part works fine. However this is my issue. When my LE order gets filled it places LE2 and LE3 properly. However if LE gets filled again before LE2 and LE3 are filled, it cancels and replaces those orders based on the new LE price. So the only way I see around the issue is to give EVERY order a different name (ie. LE1,2,3,4,5,6,etc.), but I need to be able to track these orders and that seems as if it could get messy. Is there another way around this issue?Code:Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
52 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
142 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
160 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
96 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment