[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Continues line plotting help



PureBytes Links

Trading Reference Links

Thanks Herman, thanks Ton for the correction
now everything looks fine
you guys are great
cheers
best regards
Waleed
Ton Sieverding wrote:
>
> Yes that's what I meant with 'Barcount Check' :
> *for**( b = start; b <= end **AND** b < **BarCount**; b++)*
> *Works fine. Thanks ...*
> ** 
> *Regards, Ton.*
> ** 
>
>     ----- Original Message -----
>     *From:* Herman <mailto:psytek@xxxxxxxx>
>     *To:* Ton Sieverding <mailto:amibroker@xxxxxxxxxxxxxxx>
>     *Sent:* Friday, April 20, 2007 3:28 PM
>     *Subject:* Re[4]: [amibroker] Continues line plotting help
>
>     This is due to the Blank bars setting in your Preferences, change
>     the loop statement this way (add the Red code):
>
>
>     for( b = Firstvisiblebar; b <= Lastvisiblebar AND b < BarCount; b++)
>
>
>     herman
>
>
>     Friday, April 20, 2007, 6:43:15 AM, you wrote:
>
>
>     >
>
>     	
>
>     Hermans works but ... barcount check ? End of chart to the right ...
>
>      
>
>     Regards, Ton.
>
>      
>
>      
>
>      
>
>     ----- Original Message ----- 
>
>     From: Herman <mailto:psytek@xxxxxxxx> 
>
>     To: Waleed Khalil <mailto:amibroker@xxxxxxxxxxxxxxx> 
>
>     Sent: Friday, April 20, 2007 12:07 PM
>
>     Subject: Re[2]: [amibroker] Continues line plotting help
>
>
>     This is exactly what it does:
>
>
>     Friday, April 20, 2007, 6:02:56 AM, you wrote:
>
>
>     > Thanks Herman
>
>     > But the code is not working, and what i need is to draw a
>     Continues line 
>
>     > like the ZIGZAG for every buy and sell signal to see it more like
>     a ZIGZAG
>
>     > thanks in advance
>
>
>     > Herman wrote:
>
>
>     >> Not entirely sure what you need, but this example may help you get 
>
>     >> started:
>
>
>
>     >> Buy        = Cross( MACD(), Signal() );
>
>
>     >> Sell        = Cross( Signal(), MACD() );
>
>
>
>     >> PlotShapes(IIf(Buy,        
>
>     >>  shapeHollowUpTriangle, shapeNone),5,0,BuyPrice,0);
>
>
>     >> PlotShapes(IIf(Sell,       
>
>     >>  shapeHollowDownTriangle, shapeNone),4,0,SellPrice,0);
>
>
>     >> Plot(C,"",1,128);
>
>
>
>     >> Sig =Buy OR Sell;
>
>
>     >> y0                 = 0; y1 = C[0];TPrice = C;
>
>
>     >> BI                 = BarIndex();
>
>
>     >> start         = Status("firstvisiblebarindex") - BI[0];
>
>
>     >> end         = Status("lastvisiblebarindex") - BI[0] - 1;
>
>
>     >> for(b=start ;b < end ;b++)
>
>
>     >>        {
>
>
>     >>        if( Buy[b] ) Co = colorRed;
>
>
>     >>        if( Sell[b] ) Co = colorBrightGreen; 
>
>
>     >>        if(Sig[b])
>
>
>     >>                {
>
>
>     >>                x0 = y0;
>
>
>     >>                x1 = y1;
>
>
>     >>                y0 = b;
>
>
>     >>                y1 = TPrice[b];
>
>
>     >>                Plot(LineArray(x0,x1,y0, y1),"",Co,1);
>
>
>     >>                }
>
>
>     >>        }
>
>
>
>
>     >> Friday, April 20, 2007, 5:32:49 AM, you wrote:
>
>
>
>     >> > Hi All
>
>
>     >> > Please can any one help with the foloowing code , i need to draw 
>
>
>     >> > Continues line from every buy and sell signal, but i get too
>     many lines 
>
>
>     >> > start and end point are mostly ok, but there is no Continues
>     line !
>
>
>     >> > thanks in advance
>
>
>     >> > _SECTION_BEGIN("cycle 4");
>
>
>     >> > SetChartOptions(0,chartShowArrows|chartShowDates);
>
>
>     >> > _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open
>     %g, Hi %g, 
>
>
>     >> > Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C,
>     SelectedValue( ROC( C, 
>
>
>     >> > 1 ) ) ));
>
>
>     >> > Plot( C, "Close", ParamColor("Color", colorWhite ),
>     styleNoTitle | 
>
>
>     >> > ParamStyle("Style") | styleBar );
>
>
>     >> > Condi1= Cross( Close, EMA(Close,9) ) ;
>
>
>     >> > Condi2= Cross( EMA(Close,9),Close ) ;
>
>
>     >> > Buy=Condi1 ;
>
>
>     >> > Sell=Condi2 ;
>
>
>
>     >> > x1=0;
>
>
>     >> > y1=0;
>
>
>     >> > x2=0;
>
>
>     >> > y2=0;
>
>
>
>     >> > for( i = 0; i < BarCount; i++ )
>
>
>     >> > {
>
>
>     >> > if (Buy[i])
>
>
>     >> > x1=i;
>
>
>     >> > y1=L[i];
>
>
>     >> > if (Sell[i])
>
>
>     >> > x2=i;
>
>
>     >> > y2=H[i];
>
>
>     >> > Line = LineArray( x1, y1, x2, y2, 0,0);
>
>
>     >> > Plot( Line, "Continues ", colorYellow,1 );
>
>
>     >> > if (Buy[i])
>
>
>     >> > x1=i;
>
>
>     >> > y1=L[i];
>
>
>     >> > Line = LineArray( x2, y2, x1, y1, 0,0);
>
>
>
>     >> > Plot( Line, "Continues ", colorYellow,1 );
>
>
>     >> > }
>
>
>     >> > PlotShapes( IIf(Buy,shapeDigit1,0) ,5, 0, L,-10);
>
>
>     >> > PlotShapes( IIf(Sell,shapeDigit2,0) ,4, 0, H,10);
>
>
>     >> > _SECTION_END();
>
>
>
>
>     >> > Please note that this group is for discussion between users only.
>
>
>
>     >> > To get 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.amibroke
>     <http://www.amibroker.com/devlog/>r.com/devlog/
>     <http://www.amibroker.com/devlog/> <http://www.amibroke
>     <http://www.amibroker.com/devlog/>r.com/devlog/
>     <http://www.amibroker.com/devlog/>>
>
>
>
>     >> > For other support material please check also:
>
>
>     >> > http://www.amibroke
>     <http://www.amibroker.com/support.html>r.com/support.
>     <http://www.amibroker.com/support.html>html
>     <http://www.amibroker.com/support.html> 
>
>     >> <http://www.amibroke
>     <http://www.amibroker.com/support.html>r.com/support.
>     <http://www.amibroker.com/support.html>html
>     <http://www.amibroker.com/support.html>>
>
>
>     >> >  
>
>
>     >> > Yahoo! Groups Links
>
>
>
>     >> >     http://groups.
>     <http://groups.yahoo.com/group/amibroker/>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/> 
>
>     >> <http://groups.
>     <http://groups.yahoo.com/group/amibroker/>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/>>
>
>
>
>     >> >     Individual Email | Traditional
>
>
>
>     >> >     http://groups.
>     <http://groups.yahoo.com/group/amibroker/join>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/join>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/join>join
>     <http://groups.yahoo.com/group/amibroker/join> 
>
>     >> <http://groups.
>     <http://groups.yahoo.com/group/amibroker/join>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/join>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/join>join
>     <http://groups.yahoo.com/group/amibroker/join>>
>
>
>     >> >     (Yahoo! ID required)
>
>
>
>     >> >     mailto:amibroker-
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>digest@xxxxxxxxx
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>ps.com
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx> 
>
>     >> <mailto:amibroker-
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>digest@xxxxxxxxx
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>ps.com
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>> 
>
>
>     >> >     mailto:amibroker-
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>fullfeatured@
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>yahoogroups.
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx> 
>
>     >> <mailto:amibroker-
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>fullfeatured@
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>yahoogroups.
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>>
>
>
>
>     >> >     amibroker-unsubscri
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>be@xxxxxxxxxxxx
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx> 
>
>     >> <mailto:amibroker-
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>unsubscribe@
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>yahoogroups.
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>>
>
>
>
>     >> >     http://docs. <http://docs.yahoo.com/info/terms/>yahoo.com/
>     <http://docs.yahoo.com/info/terms/>info/terms/
>     <http://docs.yahoo.com/info/terms/> <http://docs.
>     <http://docs.yahoo.com/info/terms/>yahoo.com/
>     <http://docs.yahoo.com/info/terms/>info/terms/
>     <http://docs.yahoo.com/info/terms/>>
>
>
>     >> >  
>
>
>     >>  
>
>
>
>
>     > Please note that this group is for discussion between users only.
>
>
>     > To get 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.amibroke
>     <http://www.amibroker.com/devlog/>r.com/devlog/
>     <http://www.amibroker.com/devlog/>
>
>
>     > For other support material please check also:
>
>     > http://www.amibroke
>     <http://www.amibroker.com/support.html>r.com/support.
>     <http://www.amibroker.com/support.html>html
>     <http://www.amibroker.com/support.html>
>
>     >  
>
>     > Yahoo! Groups Links
>
>
>     >     http://groups.
>     <http://groups.yahoo.com/group/amibroker/>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/>
>
>
>     >     Individual Email | Traditional
>
>
>     >     http://groups.
>     <http://groups.yahoo.com/group/amibroker/join>yahoo.com/
>     <http://groups.yahoo.com/group/amibroker/join>group/amibroker/
>     <http://groups.yahoo.com/group/amibroker/join>join
>     <http://groups.yahoo.com/group/amibroker/join>
>
>     >     (Yahoo! ID required)
>
>
>     >     mailto:amibroker-
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>digest@xxxxxxxxx
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx>ps.com
>     <mailto:amibroker-digest@xxxxxxxxxxxxxxx> 
>
>     >     mailto:amibroker-
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>fullfeatured@
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>yahoogroups.
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx>
>
>
>     >     amibroker-unsubscri
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>be@xxxxxxxxxxxx
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>com
>     <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx>
>
>
>     >     http://docs. <http://docs.yahoo.com/info/terms/>yahoo.com/
>     <http://docs.yahoo.com/info/terms/>info/terms/
>     <http://docs.yahoo.com/info/terms/>
>
>     >  
>
>      
>
>  



Please note that this group is for discussion between users only.

To get 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/