My visual effect afl collection.

amsin21

Well-Known Member
#21
Re: Multiple Timeframe for Amibroker

SetChartBkGradientFill(colorWhite,colorLightGrey,colorWhite);
Period= ParamList("Base","Monthly|Weekly|Daily|Hourly|15Minute|5Minute|1Minute",0);

if(Period=="Monthly"){
TimeFrameSet(inMonthly);
PlotOHLC(Open, High, Low, Close, "Monthly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Weekly"){
TimeFrameSet(inWeekly);
PlotOHLC(Open, High, Low, Close, "weekly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Daily"){
TimeFrameSet(inDaily);
PlotOHLC(Open, High, Low, Close, "Daily Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Hourly"){
TimeFrameSet(inHourly);
PlotOHLC(Open, High, Low, Close, "Hourly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="15Minute"){
TimeFrameSet(in15Minute);
PlotOHLC(Open, High, Low, Close, "15Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="5Minute"){
TimeFrameSet(in5Minute);
PlotOHLC(Open, High, Low, Close, "5Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="1Minute"){
TimeFrameSet(in1Minute);
PlotOHLC(Open, High, Low, Close, "1Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
_SECTION_BEGIN("multiple timeframe");
n=Param("TM",1,1,60,1);
n_open = TimeFrameGetPrice("O",n*in1Minute);
n_high = TimeFrameGetPrice("H",n*in1Minute);
n_low = TimeFrameGetPrice("L",n*in1Minute);
n_close = TimeFrameGetPrice("C",n*in1Minute);

n_Open = TimeFrameCompress( n_Open, n*in1Minute );
n_High = TimeFrameCompress( n_High, n*in1Minute );
n_Low = TimeFrameCompress( n_Low, n*in1Minute );
n_Close = TimeFrameCompress( n_Close, n*in1Minute );
Color=IIf(C>O,colorYellow,colorBlue);
PlotOHLC(n_open,n_high,n_low,n_close,"n",color,styleCandle);
_SECTION_END();
Both postings above are repetitions cycling for ages in different forums....the above AFL is not a good effort, the first post has a variant with more TF added ....but good...
 
Last edited:

yasu222

Active Member
#22
Target lines

_SECTION_BEGIN("Auto Target Levels");

GraphXSpace=1;
Plot(C,"", colorWhite,styleCandle);

// Get values for target levels

StartBar=SelectedValue(BarIndex());
FinishBar = EndValue( BarIndex() );
i = startbar;
period = FinishBar - StartBar;

Lo =LLV(L,period);
Hi = HHV(H,period);
Line0 = 0;
Line1 = 0; //Target resisten 1
Line2 = 0; //Target resisten 2
Line3 = 0; //Target resisten 3
Line4 = 0; //Target support 1
Line5 = 0; //Target support 2
Line6 = 0; // Target support 3
Line100 = 0;

for( i = startbar; i < finishbar; i++ )
{
if(EndValue(C)<SelectedValue(C))
{
Line0 = EndValue(Lo);
Line100 = EndValue(Hi);
Line1 = Line0 + (Line0*Param("UpTarget1", 0.10, 0, 1, 0.01));
Line2 = Line0 + (Line0*Param("UpTarget2", 0.18, 0, 1, 0.01));
Line3 = Line0 + (Line0*Param("UpTarget3", 0.26, 0, 1, 0.01));
Line4 = Line100 - (Line100*Param("DownTarget1", 0.10, 0, 1, 0.01));
Line5 = Line100 - (Line100*Param("DownTarget2", 0.20, 0, 1, 0.01));
Line6 = Line100 - (Line100*Param("DownTarget3", 0.30, 0, 1, 0.01));

}
else
{
Line100 = EndValue(Lo);
Line0 = EndValue(Hi);
Line1 = Line100 + (Line100*Param("UpTarget1", 0.10, 0, 1, 0.01));
Line2 = Line100 + (Line100*Param("UpTarget2", 0.18, 0, 1, 0.01));
Line3 = Line100 + (Line100*Param("UpTarget3", 0.26, 0, 1, 0.01));
Line4 = Line0 - (Line0*Param("DownTarget1", 0.10, 0, 1, 0.01));
Line5 = Line0 - (Line0*Param("DownTarget2", 0.20, 0, 1, 0.01));
Line6 = Line0 - (Line0*Param("DownTarget3", 0.30, 0, 1, 0.01));

}
}

Uppercolor=ParamColor("Uppercolor", colorRed);
Midcolor=ParamColor("Midcolor", colorSkyblue);
Lowercolor=ParamColor("Lowercolor", colorYellow);


target0= LineArray(startbar, Line0, finishbar, Line0, 0, 1);
target100 = LineArray(startbar, Line100, finishbar, Line100, 0, 1);

// depth of middle lines
n= round((finishbar-startbar)/2);

//Target line. 0=no extend, 1=extend right. 2=extend left. 3=extend both.
target1= LineArray((finishbar-n), Line1, finishbar, Line1, 1, 1);
target2= LineArray((finishbar-n), Line2, finishbar, Line2, 1, 1);
target3= LineArray((finishbar-n), Line3, finishbar, Line3, 1, 1);
target4= LineArray((finishbar-n), Line4, finishbar, Line4, 1, 1);
target5= LineArray((finishbar-n), Line5, finishbar, Line5, 1, 1);
target6= LineArray((finishbar-n), Line6, finishbar, Line6, 1, 1);


Plot(target0,"", colorWhite, styleNoLabel);
Plot(target100,"", colorRed, styleNoLabel);
Plot(target3,"", Uppercolor, styleNoLabel);
Plot(target2,"", Midcolor, styleNoLabel);
Plot(target1,"", Lowercolor, styleNoLabel);
Plot(target4,"", Lowercolor, styleDashed|styleNoLabel);
Plot(target5,"", Midcolor, styleDashed|styleNoLabel);
Plot(target6,"", Uppercolor, styleDashed|styleNoLabel);



Title = Name() + " - Auto Target Levels "

+"\n"+EncodeColor(colorLime)+"Open="+EncodeColor(colorWhite)+O
+"\n"+EncodeColor(colorLime)+"Close="+EncodeColor(colorWhite)+C
+"\n"+EncodeColor(colorLime)+"High="+EncodeColor(colorWhite)+H
+"\n"+EncodeColor(colorLime)+"Low="+EncodeColor(colorWhite)+L
+"\n"+EncodeColor(Uppercolor)+"UpTarget3= "+line3
+"\n"+EncodeColor(Midcolor)+"UpTarget2= "+line2
+"\n"+EncodeColor(Lowercolor)+"UpTarget1= "+line1
+"\n"+EncodeColor(Lowercolor)+"DownTarget1= "+line4
+"\n"+EncodeColor(Midcolor)+"DownTarget2= "+line5
+"\n"+EncodeColor(Uppercolor)+"DownTarget3= "+line6
+"\n"+EncodeColor(colorWhite)+"x= "+line0
+"\n"+EncodeColor(colorWhite)+"y= "+line100
+"\n "

;
_SECTION_END();
 

yasu222

Active Member
#23
Vbo signals

_SECTION_BEGIN("VBO");
MA1 = Param("OBV_MA1",10,1,20,1);
MA2 = Param("OBV_MA2",15,1,50,1);
MA3 = Param("OBV_MA3",20,1,100,1);
OBV1 = MA(OBV(),MA1);
OBV2 = MA(OBV(),MA2);
OBV3 = MA(OBV(),MA3);
Buy1 = Cross(OBV1,OBV3);
Sell1 = Cross(OBV3,OBV1);
OBV_BUY = ExRem(Buy1,Sell1);
OBV_SELL = ExRem(Sell1 ,Buy1);
Plot(OBV(),"",colorDarkGrey);
Plot(OBV1,_DEFAULT_NAME(),colorPink);
Plot(OBV2,_DEFAULT_NAME(),colorLightGrey);
Plot(OBV3,_DEFAULT_NAME(),colorYellow);
PlotShapes(IIf(OBV_BUY ,shapeUpArrow ,Null),colorOrange);
PlotShapes(IIf(OBV_SELL ,shapeDownArrow ,Null),colorSkyblue);
_SECTION_END();
 

amsin21

Well-Known Member
#24
Re: Vbo signals

_SECTION_BEGIN("VBO");
MA1 = Param("OBV_MA1",10,1,20,1);
MA2 = Param("OBV_MA2",15,1,50,1);
MA3 = Param("OBV_MA3",20,1,100,1);
OBV1 = MA(OBV(),MA1);
OBV2 = MA(OBV(),MA2);
OBV3 = MA(OBV(),MA3);
Buy1 = Cross(OBV1,OBV3);
Sell1 = Cross(OBV3,OBV1);
OBV_BUY = ExRem(Buy1,Sell1);
OBV_SELL = ExRem(Sell1 ,Buy1);
Plot(OBV(),"",colorDarkGrey);
Plot(OBV1,_DEFAULT_NAME(),colorPink);
Plot(OBV2,_DEFAULT_NAME(),colorLightGrey);
Plot(OBV3,_DEFAULT_NAME(),colorYellow);
PlotShapes(IIf(OBV_BUY ,shapeUpArrow ,Null),colorOrange);
PlotShapes(IIf(OBV_SELL ,shapeDownArrow ,Null),colorSkyblue);
_SECTION_END();
Bro, thanks for the AFLs :thumb:. If you can manage to add a description of AFL and a screenshot, that will be more beneficial for the fellow boarders.
 

yasu222

Active Member
#25
Re: Vbo signals

Bro, thanks for the AFLs :thumb:. If you can manage to add a description of AFL and a screenshot, that will be more beneficial for the fellow boarders.

Brother, Check in your amibroker instead depend on others...I think you are not using Amibroker simply time passing with this type of chit chats in this forum...

Enjoyyy Brother...
 

amsin21

Well-Known Member
#26
Re: Vbo signals

Brother, Check in your amibroker instead depend on others...I think you are not using Amibroker simply time passing with this type of chit chats in this forum...

Enjoyyy Brother...
I'm not in for a fight, but very bad attitude :annoyed:, I meant the good for fellow boarders. By the by, who cares the cut and paste AFLs from http://www.wisestocktrader.com. If you are doing so, atleast point out the URL as the detailed description and screenshots are available there.

Your thinking may not be always right, I do trade in Indian markets and Forex. So now you may know a little what kind of exposure I have.

For me thinking something good for fellow boarders is better than cut & paste, which can be considered as a TP. Also please don't think that you can outrun (your attitude says so) every boarders in here. Start thinking in a straight manner buddy. All the best.
 

yasu222

Active Member
#27
Re: Vbo signals

I'm not in for a fight, but very bad attitude :annoyed:, I meant the good for fellow boarders. By the by, who cares the cut and paste AFLs from http://www.wisestocktrader.com. If you are doing so, atleast point out the URL as the detailed description and screenshots are available there.

Your thinking may not be always right, I do trade in Indian markets and Forex. So now you may know a little what kind of exposure I have.

For me thinking something good for fellow boarders is better than cut & paste, which can be considered as a TP. Also please don't think that you can outrun (your attitude says so) every boarders in here. Start thinking in a straight manner buddy. All the best.

If it is cut and paste .. then you can filter out the good ones from all the stuff available on earth and do same job as mine... Take care buddy...:lol:
You are just meant for spoiling nothing else...
 
#28
Re: Multiple Timeframe for Amibroker

SetChartBkGradientFill(colorWhite,colorLightGrey,colorWhite);
Period= ParamList("Base","Monthly|Weekly|Daily|Hourly|15Minute|5Minute|1Minute",0);

if(Period=="Monthly"){
TimeFrameSet(inMonthly);
PlotOHLC(Open, High, Low, Close, "Monthly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Weekly"){
TimeFrameSet(inWeekly);
PlotOHLC(Open, High, Low, Close, "weekly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Daily"){
TimeFrameSet(inDaily);
PlotOHLC(Open, High, Low, Close, "Daily Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Hourly"){
TimeFrameSet(inHourly);
PlotOHLC(Open, High, Low, Close, "Hourly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="15Minute"){
TimeFrameSet(in15Minute);
PlotOHLC(Open, High, Low, Close, "15Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="5Minute"){
TimeFrameSet(in5Minute);
PlotOHLC(Open, High, Low, Close, "5Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="1Minute"){
TimeFrameSet(in1Minute);
PlotOHLC(Open, High, Low, Close, "1Minute Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
_SECTION_BEGIN("multiple timeframe");
n=Param("TM",1,1,60,1);
n_open = TimeFrameGetPrice("O",n*in1Minute);
n_high = TimeFrameGetPrice("H",n*in1Minute);
n_low = TimeFrameGetPrice("L",n*in1Minute);
n_close = TimeFrameGetPrice("C",n*in1Minute);

n_Open = TimeFrameCompress( n_Open, n*in1Minute );
n_High = TimeFrameCompress( n_High, n*in1Minute );
n_Low = TimeFrameCompress( n_Low, n*in1Minute );
n_Close = TimeFrameCompress( n_Close, n*in1Minute );
Color=IIf(C>O,colorYellow,colorBlue);
PlotOHLC(n_open,n_high,n_low,n_close,"n",color,styleCandle);
_SECTION_END();
Both postings above are repetitions cycling for ages in different forums....the above AFL is not a good effort, the first post has a variant with more TF added ....but good...


HEY... thanks for posting. but this is no where close to what i have been asking for about a month now. i think lets just drop this idea.

pm me if u get it.:)
 

yasu222

Active Member
#29
show|hide the indicator- example

_SECTION_BEGIN( "show|hide" );
VWAP_swinG = ParamToggle( "VWAP_swinG", "Hide|Show", 1 );
_SECTION_END();

if ( VWAP_swinG== 1 )
{

_SECTION_BEGIN("VWAP_swinG");
f=Param(" Periods ",1,0,5000,1);
no1=Param( "Swing", 1, 1, 300 );
VWAPH = Sum(V*H,f)/Sum(V,f) ;
VWAPL = Sum(V*L,f)/Sum(V,f) ;
B1=HHV(VWAPH,no1);
S1=LLV(VWAPL,no1);
avd=IIf(C>Ref(B1,-1),1,IIf(C<Ref(S1,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,S1,B1);
// line code
Plot(tsl, _DEFAULT_NAME(), colorYellow, styleStaircase);
_SECTION_END();

}
 
Last edited:

amsin21

Well-Known Member
#30
Re: show|hide the indicator- example

_SECTION_BEGIN( "show|hide" );
VWAP_swinG = ParamToggle( "VWAP_swinG", "Hide|Show", 1 );
_SECTION_END();

if ( VWAP_swinG== 1 )
{

_SECTION_BEGIN("VWAP_swinG");
f=Param(" Periods ",1,0,5000,1);
no1=Param( "Swing", 1, 1, 300 );
VWAPH = Sum(V*H,f)/Sum(V,f) ;
VWAPL = Sum(V*L,f)/Sum(V,f) ;
B1=HHV(VWAPH,no1);
S1=LLV(VWAPL,no1);
avd=IIf(C>Ref(B1,-1),1,IIf(C<Ref(S1,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,S1,B1);
// line code
Plot(tsl, _DEFAULT_NAME(), colorYellow, styleStaircase);
_SECTION_END();

}
What exactly this post differs from this post of your own.? Please describe. :confused:. A similar code is here as the last section for your reference in case required : http://www.amibroker.com/library/detail.php?id=1190.
 
Last edited:

Similar threads