I am trying to develop a system that uses two orders to stop to go out of the position:
-The first order is based on the break of a channel.
-The second order is a protection stop across SetStopLoss.
When I combine these two orders inside an alone system there works correctly the order SetStopLoss and the first order stops working. To that it can be due?
This problem can be seen with a code as simple as this:
protectedoverridevoid Initialize()
{
SetStopLoss("", CalculationMode.Percent, 0.005, false);-------->This Order Works OK
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (Close[0] > Open[0])
{
EnterLong(DefaultQuantity, "");
}
ExitLongStop(MIN(Low, 14)[0], "", "");------>This Order do not Work
}
I am using the version 6.5.1000.8, nevertheless with other versions the same thing was not happening. How it might solve it?
Regards and thank you very much in yours time
Comment