Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to scale in to position?
Collapse
X
-
How to scale in to position?
Please show me how to use the wizard to simply add to a long position if my current unrealized pnl is in the red. So if MACD crossed above 0 I go long and if my current position is negative then wait for MACD to cross above 0 again and add to this position. Basically I want to average lower my current position price. Thank youTags: None
-
relogical,
Ok, so you can check PnL in your condition builder and compare to numeric value. The issue here is that the strategy wizard uses the "managed approach" so what can happen is it won't let you open another position with the same signal name, or even another position with a different signal name depending on your entry handling.
Here is more information on entry handling, I would suggest you read and try to understand because it can change how you implement this : http://www.ninjatrader.com/support/f...37&postcount=2
Please see the screen shot for info on how to setup one and only one additional order via unique entry signal. In this case we would want EntriesPerDirection = 1, and Entry Handling set to "UniqueEntries".Last edited by NinjaTrader_AdamP; 07-08-2012, 11:48 AM.Adam P.NinjaTrader Customer Service
Comment
-
IT's not working for me. Please help me to resolve this. My code is below:
Code:/// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Condition set 1 if (Position.GetProfitLoss(Close[0], PerformanceUnit.Currency) < -30) { Variable0 = 0; } // Condition set 2 if (Open[0] > Open[1]) { EnterLong(PositionSize1, ""); Variable0 = 1; } // Condition set 3 if (Variable0 == 1 && Variable0 == 0) { EnterLong(PositionSize2, ""); Variable0 = 2; } // Condition set 4 if (Variable0 == 2 && Position.GetProfitLoss(Close[0], PerformanceUnit.Currency) > 2) { ExitLong("", ""); } // Condition set 5 if (Variable0 == 1 && Position.GetProfitLoss(Close[0], PerformanceUnit.Currency) > 2) { ExitLong("", "");
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, Yesterday, 04:31 AM
|
0 responses
33 views
0 likes
|
Last Post
by sjsj2732
Yesterday, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
286 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
286 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
133 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
91 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment