Closing candle above 20SMA

Can anyone guide me, how can i code

10 min candle close above 20 SMA
10 min candle close above Vwap.

it will be my entey point.

how to code this in tradetron?

Try something like this please:

For SMA-20 you can use the spot price. But for VWAP needs volume, so spot of Nifty can not be considered, it has to be have an instrument which has underlying volume (say Future or Options)