Damn new to AFL facing problem

#1
Hello,

I am trying how to write AFL. For a test I like to write the following as AFL

EMA( Close , 12 ) == EMA1; //"Error : Variable EMA1 used without having been initialized."
EMA( EMA1 , 12 ) == EMA2;
DIF12==EMA1-EMA2;
PLOT DIF12; // I like to plot this. How to use the correct plot syntax?

How do I write this? How to declare the variables?

Thanks in advance.
 
Last edited:

KelvinHand

Well-Known Member
#2
Hello,

I am trying how to write AFL. For a test I like to write the following as AFL

How do I write this? How to declare the variables?

Thanks in advance.
PHP:
EMA1=EMA(  Close , 12 );
EMA2=EMA(  EMA1 , 12 );
DIF12=EMA1-EMA2;
PLOT(DIF12, "I like to plot this. How to use the correct plot syntax", colorRed, styleLine);
Please make a habit to read the help guide come with the Amibroker.
Also make a habit to bracket the code as show above.
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?