inputs: Price( Close ), Length( 9 ), ConfirmBars( 1 ), DoMarketHourCheck( false ) ;
variables: Counter( 0 ), MarketHours( false ) ;
MarketHours = (Time >= 0830 and Time < 1500);
if (DoMarketHourCheck = false) or (DoMarketHourCheck and MarketHours) then
begin
if Price < AverageFC( Price, Length ) then
Counter = Counter + 1
else
Counter = 0 ;
if CurrentBar > ConfirmBars and Counter = ConfirmBars then
{ CB > ConfirmBars check used to avoid spurious cross confirmation
at CB = ConfirmBars }
Sell Short ( "MACrossSE" ) next bar at market ;
end;
AverageFC is simply like a moving average

Comment