AFL writing guide for new user

ethan hunt

Well-Known Member
Dear Johnny,

thanks.

but somehow while posting my previous messege a wrong messege was quoted.

My AFL requirement is as below:

Condition A (Eg: EMA 20 & EMA 100 crossover)
PREVIOUS DAY: Stocks meet Condition A in EOD charts.

Condition B (Eg: Break of Hi / Lo of previous day)
TODAY: Such short listed stocks meeting condition A to be scanned in Intraday Charts for break of previous day Hi / Lo (Condition B)

Is it possible to combine condition A & B in one AFL, so that the scanning is done TODAY in Intraday charts ?

Separate AFLs for Condition A & B can be made, but how to combine into one AFL as first condition is EOD & second is Intraday real time !
Bump.
anyone !
 
I want to learn the basics from the beginning to write a AFL in ami and MT4 , where can i study and search for the needed codes and learn to write a AFL.

in the mean while, if the following explained in the afl code language will be helpful.

how to store the series from a result in a sequence upto 20 numbers just like for example stocastic calculated and drawn in a chart, from that stocastic while calculating it has to store the latest 20 candle stocastic values in a series integer s1 to s20 for further utilization in the calculation. (when a new number added at the last then the first no should deleted and total s1-s20 twenty integer set no.s to be maintained)

Thanks for this thread providers and all contributions , my pranaam to all experts.
 
SIR Debarghya Mukherjee! can you help me please buy sell explore(not scan) wma15/wma30/wma50/wma80/wma120/wma200 and another cod want to explore 50dayswma/200dayswma which give me result how much percent% stock 50/200wma above/below! thanks a lot sir!
 
Hi,
I have a doubt. Can you please clarify?
While using ExRem function, it is supposed to remove extra buy sell signals. What it does is, it will plot only alternate buy sell signals.
When trying to code intraday system, I dont want the extra signals, but want the FIRST signal of the day. now suppose a buy signal was formed yesterday, and a buy signal is again formed today, the ExRem function deletes that Buy signal, whereas it should be a valid signal, as it is formed next day of the previous buy signal.
Anyone have any idea around this problem?

Thanks
 
may be help it!

numbars = SelectedValue(Cum(Status("barvisible")));
fraction= IIf(StrRight(Name(),3) == "",3.2,3.2);
hts = Param ("Text Shift", -50,-100,100,10);
PlotText("-----------" + WriteVal(C,fraction),
SelectedValue(BarIndex())-(numbars/hts),SelectedValue(C),2);
 
i think i am learning...
but i have some questions ????
in "C"
we do #include <> then main{}
but we don't do it here
just
_SECTION_BEGIN("price section");


_SECTION_END();

can you explain line by line plz
 
Hi All,

If I want to ignore subsequent buy signal till say 10 periods after the buy signal, how to achieve that. I am trying to do it somehow using barsince function, but not able to hit the nail till now.
Also, if I specify target and stoploss after buy signal, then all next buy signals should be ignored till either 1. target 2. stoploss or 3. day end. Can anyone help me in suggesting the framework of such a code?

Thanks
 

Similar threads