This is the code of the system:
#region Variables
// Wizard generated variables
privateint barrasPivot = 5; // Default setting for BarrasPivot
// User defined variables (add any user defined variables below)
#endregion
///<summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
///</summary>
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
EnterLongStop(DefaultQuantity, Swing(BarrasPivot).SwingHigh[0], "");
EnterShortStop(DefaultQuantity, Swing(BarrasPivot).SwingLow[0], "");
}
There are some occasions at which the system work correctly and there are others in which the system does not do any trade. In some occasions if I change the parameter "BarrasPivot" the system stops working though it has sufficient historical data. What I can do to solve this mistake?
Thank you very much in advance.
In the following file it is possible to find the code of the system:
Comment