I am just coming back to NT from a while away and was hoping someone could help me with some code... If this is not the best place to ask, please let me know
What I am wanting to achieve, is to set a variable say 'percentaboveMA' (which I can then use as part of a strategy or to plot as a indicator, which will display the percentage of times that the low of the day is above a SMA for the last X periods (say 40 periods).
In Metastock the formula is: Sum( L>Mov(C,20,S), 40)*100/120
I imagine I may have to use a count and loop, or does anyone know if there is a built in NT function i can use?
Thanks a lot & cheers,
Shane
Comment