protected override void OnBarUpdate()
{
if (CurrentBar < 3)
return;
// Set 1
inSideBar = (High[1] < High[2] && Low[1] < Low2);
OxO = (High[1] - Low[1]);
if (inSideBar)
{
if (Close[0] < (Low[1] - (1 * TickSize)));
{
Print (Time[0] + " H1:" + High[1] + " H2:" + High[2] + " C1:" + Close[1] + " C0:" + Close[0] + " 1x1:" + OxO);
CandleOutlineBrushes [1]= Brushes.Yellow;
EnterShort(Convert.ToInt32(DefaultQuantity), "inSideBar");
}
}
protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
{
SetStopLoss(@"inSideBar", CalculationMode.Price, Close [0] - OxO, false);
SetProfitTarget(@"inSideBar", CalculationMode.Price, Close [0] -
OxO);
Print(OxO);
}
}
}
Some problems for me is showing in the attachment.
It is the result after I turn off and on the tick replay in Strategy Analyzer
Actually, I want to entry just right after every "insidebar" once.
Thx
Comment