Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
CalculateMode.Percent stop loss gets cancelled
Collapse
X
-
CalculateMode.Percent stop loss gets cancelled
I'm using the simulator version of NT and when I try to use SetStopLoss(CalculateMode.Percent, 2) the stop gets cancelled. If I use one of the other modes the stop will trigger. Why is the percent mode always cancelling?Tags: None
-
Tried it and the stop orders still get cancelled.
I just added it to the MAcrossover template:
protectedoverridevoid Initialize()
{
SMA(Fast).Plots[0].Pen.Color = Color.Orange;
SMA(Slow).Plots[0].Pen.Color = Color.Green;
Add(SMA(Fast));
Add(SMA(Slow));
CalculateOnBarClose = true;
SetStopLoss(CalculationMode.Percent, 0.02);
}
///<summary>
/// Called on each bar update event (incoming tick).
///</summary>
protectedoverridevoid OnBarUpdate()
{
if (CrossAbove(SMA(Fast), SMA(Slow), 1))
{
EnterLong("CrossLong");
}
elseif (CrossBelow(SMA(Fast), SMA(Slow), 1))
{
EnterShort("CrossShort");
}
}
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 05:44 AM
|
0 responses
6 views
0 likes
|
Last Post
by kujista
Today, 05:44 AM
|
||
Started by ZenCortexCLICK, Today, 04:58 AM
|
0 responses
8 views
0 likes
|
Last Post Today, 04:58 AM | ||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
172 responses
2,281 views
0 likes
|
Last Post
by sidlercom80
Today, 04:40 AM
|
||
Started by Irukandji, Yesterday, 02:53 AM
|
2 responses
18 views
0 likes
|
Last Post
by Irukandji
Today, 03:55 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
0 responses
10 views
0 likes
|
Last Post
by adeelshahzad
Today, 03:54 AM
|
Comment