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

Re: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)



PureBytes Links

Trading Reference Links

Hello,
 
Please use modulo (%) operator:
 
 
zStartDate = Month()==01 AND Day() == 02 ; // Start Period on a Daily Chart for example
 
zStartDate = ( BarsSince( zStartDate ) % 12 ) == 0;
 
Plot(zStartDate * Close,"Start Date",6,6 | styleNoLabel); // I got this far...
 
 
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Mr. Valley
Sent: Sunday, January 13, 2008 5:51 AM
Subject: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)

How does one code a loop to plot vertical line beginning on a particular period in the past
and then redraw the same vertical line at a given interval in (n) Trading Periods so it does not fall on a weekend? 
( I suppose if it falls on Saturday, plot on Friday before and if it falls on Sunday, plot it on Monday.
 
Let's say I replot the vertical line every 12 days,but want to avoid weekends...
 
Is there a better function that would take care of it for both intraday and daily intervals?
 
////////////////// Vertical Line Plot for Starting Seed
zStartDate = Month()==01 AND Day() == 02 ; // Start Period on a Daily Chart for example
Plot(zStartDate * Close,"Start Date",6,6 | styleNoLabel); // I got this far...
 
Thanks,
 
Mr Valley
__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___