Could you pls write AFL for this simple strategy?

#1
AFL experts, could you please help me with this?

I am testing a strategy, for that I need a Simple Moving Avgs. that must calculate by taking HIGH prices for 10 and Low prices for 8 periods/bars/candles instead of closing prices.

Conditions:

1. 10 period Simple Moving Avg. by taking HIGH price of each bar/candle (usually we take closing prices).

2. 8 period Simple Moving Avg. by taking LOW price of each bar/candle.

Thanks in advance.
 

mahesh2007

Active Member
#2
AFL experts, could you please help me with this?

I am testing a strategy, for that I need a Simple Moving Avgs. that must calculate by taking HIGH prices for 10 and Low prices for 8 periods/bars/candles instead of closing prices.

Conditions:

1. 10 period Simple Moving Avg. by taking HIGH price of each bar/candle (usually we take closing prices).

2. 8 period Simple Moving Avg. by taking LOW price of each bar/candle.

Thanks in advance.
Avgh=MA(H,10);
Avgl=MA(L,8);
Plot(Avgh,"Avgh",colorRed,styleLine);
Plot(Avgl,"Avgl"colorGreen,styleLine);
 

Similar threads