For example, I want to:
Identify a price level to enter trade based on previous bar high/low.
As soon as price goes below/above this identified price, I want to be able to enter an order immediately on the next following bar which crosses that price boundary.
I have tried using GetCurrentAsk() < MyPriceLevel for example, but this still doesn't work even though I've set Calculate.OnPriceChange within OnStateChange() so that OnBarUpdate is called on each price change.
Example I've tried:
protected override void OnBarUpdate()
{
if(GetCurrentAsk() < SomePriceLevel)
{
EnterShort(Convert.ToInt32(DefaultQuantity), @"TheBigShort");
}
}
Can someone please suggest a method which will work or why this won't work.
Thanks
Gerard
Comment