PureBytes Links
Trading Reference Links
|
Hello ,
I wish to draw a segment line AFTER that 2 MA have crossed .
For the instant I have draw 3 lines but before the crossing point .
My idea is to extend to the right the resistance's line until she is
reaching the price's curve .
Thanks ?
Here is my code
aire1 = WMA(C,150);
aire2 = MA(C,260);
Croisement = 0 ;
bi = BarIndex();
beforebar =0 ;
barnum = 0;
barvalue=0 ;
periode = Param("Période choisie",160,1,720,1);
barnum = IIf( Cross(WMA(C,150),MA(C,260))== 1,int(bi),False);
beforebar = IIf(Cross(WMA(C,150),MA(C,260))== 1,int(bi) -periode,False);
barvalue = IIf(Cross(WMA(C,150),MA(C,260))== 1 ,
ValueWhen(Cross(WMA(C,150),MA(C,260)),WMA(C,150)),False);
resist = IIf(Cross(WMA(C,150),MA(C,260))== 1 , HHV(High,periode),False);
support = IIf(Cross(WMA(C,150),MA(C,260))== 1 , LLV(Low,periode),False);
yresist = 0 ;
ysupport = 0 ;
prixlimite = 0;
resistance =0;
for(i=periode;i<BarCount -1 ;i++)
{
if (barnum[i] != 0 AND barvalue[i] != 0)
{
x0 = beforebar[i];
y0 = barvalue[i];
x1 = barnum[i];
y1 = y0;
fondations =LineArray(x0,y0,x1,y1,0);
Plot( fondations , "Kind of support", colorRed);
PlotText("FONDATIONS",x0,y0,colorGreen);
yresist =resist[i];
resistance =LineArray(x0,yresist,x1,yresist,0);
Plot( resistance, "RESISTANCE", colorRed);
PlotText("Résistance = "+ yresist,x0,yresist,colorGreen);
prixlimite = resist[i]+ 0.25 ;
ysupport =support[i];
supportfinal =LineArray(x0,ysupport,x1,ysupport,0);
Plot( supportfinal, "SUPPORT", colorRed);
PlotText("Support ="+ ysupport,x0,ysupport,colorGreen);
}
}
/*while (C < resist)
{
x0 = afterbar[i]; // how to say AFTER the crossing bar ?
y0 = barvalue[i];
x1 = barnum[i];
y1 = y0;
yresist =resist[i];
resistance =LineArray(x1,yresist,x0,yresist,0);
Plot( resistance, "RESISTANCE", colorRed);
barnum++ ;
}*/
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
*********************************
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|