how to write current ask price is greater than moving average

 


i am trying to write some code saying

current bar ask price is greater than current bar simple moving average (5ma, close price, simple.)

is this correct:

MarketInfo(Symbol(),MODE_ASK)> iMA(NULL, NULL,5,0,MODE_SMA,PRICE_CLOSE,0)

and

current bar bid price is less than the current bar 5 moving average:

MarketInfo(Symbol(),MODE_BID)< iMA(NULL, NULL,5,0,MODE_SMA,PRICE_CLOSE,0)

thanks for your help

 
Please use this to post code . . . it makes it easier to read.

For timeframe, replace NULL with 0. Have you referred iMA documentation at this ???

 

Why not just use:

Ask>iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0)

Bid<iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0)
 
thank you very much!