Can any one guide me how to make this afl

gsn57iaf

Active Member
#1
Is it possible to create an AFL plotting EMA34 high, EMA34 low and EMA34 close. My request to experienced members to kindly make this AFL if possible. Thanks.
 
#2
Hi

Try this one. Hope this what you are looking for.


_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorBlack));
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
_SECTION_END();

_SECTION_BEGIN("Moving Averages");
Plot(EMA(Close,34),"",colorBlue,styleLine);
Plot(EMA(High,34),"",colorRed,styleLine);
Plot(EMA(Low,34),"",colorGreen,styleLine);
_SECTION_END();

_SECTION_BEGIN("Basic Chart");
Plot(Close,"Price",colorWhite, styleCandle);
SetChartOptions(0,chartShowArrows|chartShowDates);
_SECTION_END();

:clap:
 
#4
Hi AFL experts,

Help requested for making AFL formula for drawing 30min-5ema, in 5min chart during Intraday (market hours). 5emas levels to be latest levels i.e. same value when you see 5ema in 30min chart at any time. To avoid keep changing chart window to 30min & 5min & vice-versa

Note: I tired with "Timeframeset", Timeframerestore" &Time frmaeexpand" for plot" as shown in Help search but always error indicating "variable 'in30minute' used without having been initialized".

I am using AmiBroker version:5.30.1

Thanks in advance

Regards,
Keerthi
 
#5
Hi

Try this one. Hope this what you are looking for.


_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorBlack));
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
_SECTION_END();

_SECTION_BEGIN("Moving Averages");
Plot(EMA(Close,34),"",colorBlue,styleLine);
Plot(EMA(High,34),"",colorRed,styleLine);
Plot(EMA(Low,34),"",colorGreen,styleLine);
_SECTION_END();

_SECTION_BEGIN("Basic Chart");
Plot(Close,"Price",colorWhite, styleCandle);
SetChartOptions(0,chartShowArrows|chartShowDates);
_SECTION_END();

:clap:


Could you pls guide me in learning how to make Afl for amibroker
 
#6
Keerthi

Try this

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"Close",colorBlack,styleCandle);
TimeFrameSet(in5Minute*6);
x=EMA(C,5);
TimeFrameRestore();
Plot(TimeFrameExpand(x,in5Minute*6),"EMA5 30Min",colorBlue,styleLine);

vidyasagar
 
#8
Can this be applied for 5ema High , Low and Close also ?
 
#9
Mr.Vidyasagar,

AFL working fine & thanks a lot.

Sorry for troubling you again.

I am using Amibroker for my charting needs.
Requesting to change setup to get vertical lines inside cloud.
In Ichimoku chart, inside cloud showing full color (either light green or red) but I want vertical lines without any color instead of full color.
In AFL, styleCloud set up is: 4096,0,0,26.

Thanks & Regards,
Keerthi

Keerthi

Try this

SetChartOptions(2,chartShowDates);
GraphXSpace=5;
Plot(C,"Close",colorBlack,styleCandle);
TimeFrameSet(in5Minute*6);
x=EMA(C,5);
TimeFrameRestore();
Plot(TimeFrameExpand(x,in5Minute*6),"EMA5 30Min",colorBlue,styleLine);

vidyasagar
 
#10
Can this be applied for 5ema High , Low and Close also ?
Yes, change the EMA 34 setting slider to EMA 5. Alternately you can edit the AFL posted earlier and edit the following lines to show as under:

Plot(EMA(Close,5),"",colorBlue,styleLine);
Plot(EMA(High,5),"",colorRed,styleLine);
Plot(EMA(Low,5),"",colorGreen,styleLine);
 

Similar threads