Suppose I want to buy when the price of the current bar is higher than the high of the previous bar.
The system can be :
protected override void Initialize()
{
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if (High[0] > High[1])
{
EnterLong;
}
}
But in this system the high [0] is only known at the close of the bar.
How can I put an order at any time, when high[0] is greater than High[1].
Thank you.
Comment