[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

Bob,
 
I tried the individual number of days iteration plot to begin with on a manual plot basis and the issue
I ran into with the vertical plot was that it would not plot vertically on a weekend, it just would not show up,
so I had to go with trading days in bar form.  For me, only the trading days would show up.
 
Mr Valley
 
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of bjagow@xxxxxxxxxxxxx
Sent: Sunday, January 13, 2008 8:02 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)

To me, only calendar days made sense given that Trading Periods don't fall on weekends.
----- Original Message -----
Sent: Sunday, January 13, 2008 2:10 PM
Subject: Re: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)

The problem was
 
"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 
 
with "n Trading Periods" I would think that he meant trading days (i.e. bars), not calendar days.
 
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Sunday, January 13, 2008 9:26 PM
Subject: Re: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)

I believe he asked for calendar days adjusted to nearest weekday.
 
Bob
----- Original Message -----
Sent: Sunday, January 13, 2008 3:05 AM
Subject: Re: [amibroker] Plot Vertical Line at Trading_Day_Interval(n)

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

__,_._,___