I created the following strategy (OnBarUpdate):
if (CrossAbove(Close, EMA(SMA_Length), 1))
{
EnterLong(1, "");
}
if (CrossAbove(Close, EMA(SMA_Length2), 1))
{
EnterLong(1, "");
}
if (CrossAbove(Close, EMA(SMA_Length3), 1))
{
EnterLong(1, "");
}
// Condition sets close
if (CrossBelow(Close, EMA(SMA_Length), 1))
{
ExitLong(1);
}
if (CrossBelow(Close, EMA(SMA_Length2), 1))
{
ExitLong(1);
}
if (CrossBelow(Close, EMA(SMA_Length3), 1))
{
ExitLong(1);
}
When optimizing, however, I receive only the optimal values for the first two SMA_Length variable, the third stays at one, but does generate any entries, exits.
I used the ranges 10;30;4, 20;80;5 and 50;200;10.
Entries per direction is set at 3, EntryHandling AllEntries. Order Quantity = by strategy, Gtc
What is more is that while showing a Profit Factor of 2,3 the culumated profit is 2.508,52%. How is this calculated?
Kindest regards,
nescio

Comment