I'm having difficulties amending the entry quantity during my back test and I would like to know how to go about it. The following is my code Could you kindly advise?
#region Variables
privatedouble entryPrice = 1;
privatedouble stopLoss = 1;
privateint PositionQty = 300;
protectedoverridevoid Initialize()
{
Add(CurrentDayOHL());
SetStopLoss("", CalculationMode.Price, StopLoss, true);
ExitOnClose = true;
ExitOnCloseSeconds = 30;
CalculateOnBarClose = true;
}
protectedoverridevoid OnBarUpdate()
{
if (Entry Conditions
{
EnterLongStopLimit(PositionQty,entryprice+0.02,entryprice,"SqueezeBuy" );
}
}
Thanks
Comment