Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
unique entry
Collapse
X
-
Hello zachj,
Thank you for your post.
To exit uniquely with SetStopLoss() and SetTrailStop() you will need to call the signalName of the entry you wish to exit.
The syntax for SetStopLoss() is the following: SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool simulated)
And for SetTrailStop() it is the following: SetTrailStop(string fromEntrySignal, CalculationMode mode, double value, bool simulated)
For information on the different order methods please visit the following link: http://www.ninjatrader.com/support/h...er_methods.htm
Please let me know if you have any questions.
-
So if I have..
if //conditions here//
{EnterLong(200, "SPY");}
Would I have...
if //conditions here//
{SetStopLoss("SPY", CalculationMode.Ticks, 1);}
because I'm getting an error message, tried SPY w/o parantheses too. I do have a for loop at the start of the Entry and StopLoss not sure if that throws it off.
For loop is.... for (int series = 0; series < 3; series++)Last edited by zachj; 06-30-2013, 07:13 PM.
Comment
-
Ok gotcha.
If I wanted to do multiple instruments is this the best way to do it or is there a shorter way, if this even would work that is....
SetStopLoss("SPY", CalculationMode.Ticks, 1, false);
SetStopLoss("DIA", CalculationMode.Ticks, 1, false);
I have the EnterLong based on a loop where it keeps pulling through one series at a time...
for (int series = 0; series < 3; series++)
//entry conditions
{EnterLong();}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
57 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
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 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