I first tried to include a stop loss and profit target of 10% in either direction and even though the price traveled there it was never triggered...what might be the common problem there?
Then, I took one simple instrument that I knew went to the Price range (changed from percent to price) I input, and got bizarre results. See chart and the code below. All stop out and most of them at the same as teh entry price.
///<summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
///</summary>
protectedoverridevoid Initialize()
{
Add(VOLMA(MADaysShort));
Add(VOLMA(MADaysLong));
SetStopLoss("long", CalculationMode.Price, 0.5, false);
SetProfitTarget("long", CalculationMode.Price, 0.7);
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (CrossAbove(VOLMA(MADaysShort), VOLMA(MADaysLong), 1))
{
EnterLong(DefaultQuantity, "long");
}
}
#region

Comment