Simple Coding Help - No Promise.

Hello,

Please I need assistance to code a AFL for the below idea -

I understand that rising EMA line indicates rising prices and falling EMA line indicates falling price.

I trade in 3 min. time frame (for few days) with EMA 50 as my indicator.

I request the person having knowledge of AFL coding to implement the above idea.

The AFL should display a histogram (similar to MACD) that is green when the EMA line (value) is rising and red when the EMA line (value) is falling.

So far I am long when the candle is above EMA 50 and short when the candles are below EMA 50 line.

It is very difficult to keep of rising EMA line manually and hence this visual indicator would be a great help.

Appreciate the efforts and thanks in advance.

Brgds,
Mohan
 
CAN ANY ONE CORRECT THIS AFL
_SECTION_BEGIN("Rays1");
line=ParamToggle("Line","No|Yes",1);
if(line)
{

Pp1=Param("Ray_Period1",3,1,20,1);
Pp2=Param("ATR_Period1",4,1,20,1);
Cal=HHV(LLV(HaHigh,Pp1)-ATR(Pp2),5);

Plot(Cal,"",Linecolor ,ParamStyle("styleLine 1",styleLine|styleThick,maskAll));
positive= Cross(HaClose,Cal);
negative=Cross(Cal,HaClose);


}

_SECTION_END();
 

Similar threads