Hi,
I need some help with AFL coding.
What I want to have is simple text alerts when:
1) price hits new DAILY lows
2) price hits new DAILY heights
3) change between last price and previous day close i 0%
4)change between last price and current day Open is 0.
I use Amibroker Professional version so I can use function GetRTData:
I tried this:
x1=GetRTData("Last");
x2=GetRTData("Open");
x3=GetRTData("High");
x4=GetRTData("Low");
x5=GetRTData("Prev");
AlertIf(x2-x1=0,"","Open",1);
AlertIf(x3-x1=0,"","NewHigh",1);
AlertIf(x4-x1=0,"","NewLow",1);
AlertIf(x5-x1=0,"","Zero",1);
..but, in Alertif function there is lookback parameter.
How can I change lookback parameter to show only current day quotes.
I can't set this parameter to fixed number because I use 1min bars and in the first few minutes of the session it will takes numbers from previous day bars.
Maybe there is another way to run this simple alerts..
Thank You in advance
Marek
I need some help with AFL coding.
What I want to have is simple text alerts when:
1) price hits new DAILY lows
2) price hits new DAILY heights
3) change between last price and previous day close i 0%
4)change between last price and current day Open is 0.
I use Amibroker Professional version so I can use function GetRTData:
I tried this:
x1=GetRTData("Last");
x2=GetRTData("Open");
x3=GetRTData("High");
x4=GetRTData("Low");
x5=GetRTData("Prev");
AlertIf(x2-x1=0,"","Open",1);
AlertIf(x3-x1=0,"","NewHigh",1);
AlertIf(x4-x1=0,"","NewLow",1);
AlertIf(x5-x1=0,"","Zero",1);
..but, in Alertif function there is lookback parameter.
How can I change lookback parameter to show only current day quotes.
I can't set this parameter to fixed number because I use 1min bars and in the first few minutes of the session it will takes numbers from previous day bars.
Maybe there is another way to run this simple alerts..
Thank You in advance
Marek