I might not understand EnterLongStop correctly, is it a Long Stop order? So if I want to buy if the day's price is higher than the previous day high, I call:
EnterLongStop( 1, true, DefaultQuantity, High[1] + BidAskSpread, "OpenLong" ) ;
Below is my code, it doesn't work as it supposes to be. For now, I can only use EnterLong and EnterShort and they always use the next day's open instead of the exact THE SAME DAY entry price (as long as the day is tick higher than yesterday's high) I want. Please help, thanks.
protected override void Initialize()
{
Add( PeriodType.Minute, 1 ) ;
CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
if( BarsInProgress != 0 )
return ;
if (CrossAbove(...))
EnterLongStop( 1, true, DefaultQuantity, High[1] + BidAskSpread, "OpenLong" ) ;
if (CrossBelow(...))
EnterShortStop( 1, true, DefaultQuantity, Low[1] - BidAskSpread, "OpenShort" ) ;
}
There're no trades at all if I use the code above.

Comment