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

RE: [amibroker] Re: Day Session or 24 Hour from AFL...?


  • Date: Thu, 18 Mar 2010 12:41:20 -0500
  • From: "Joris M.schuller" <jmschuller@xxxxxxxxxxx>
  • Subject: RE: [amibroker] Re: Day Session or 24 Hour from AFL...?

PureBytes Links

Trading Reference Links



To be honest, I don’t understand the problem, what makes solving it difficult.  There are at least 4 ways to determine whether you are in the 24 Hr mode (afl or no afl):

1. As mentioned before: File/Database Settings/Intraday settings/Filtering

2. Look at the chart which will show big time gaps in the day session

3. The chart will show large daily gaps in the day session between close and next day’s open. (In 24 Hr session there is only aMonday 0:00AM gap)

4. If all that fails, ask Janeczko for the 2 or 3 line flag code

 

Having said that, here some code which perhaps solves the problem (whatever it is).

 

Good Luck

 

Title = EncodeColor(4)+ _DEFAULT_NAME()+";  "+EncodeColor(1) + StrFormat("{{NAME}} - {{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g, (%.1f%%){{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) );
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarsRequired(inDaily/Interval(),0);// Necessary to determine Day Session or 24 Hr Session
DayChange =
Day()!= Ref(Day(), -1);
StDay1 =
ValueWhen(DayChange, BarIndex(), 1);
StDay2 =
ValueWhen(DayChange, BarIndex(), 2);
NumDayTimeBars = StDay1 - StDay2;
_24HrBars = inDaily/
Interval();
Cond=
WriteIf(NumDayTimeBars/_24HrBars<0.95,"Day Session","24 Hr Trading");
//Cond<=1, because certain brokers don't display all 24 Hr data and also in case of occasional data loss:
//for example IB does not display 12:00-12:15 AM in Forex (4-4:15 PM CST)
Plot(C,"\n"+Cond+"\nDay Session Bars = "+WriteVal(NumDayTimeBars ,1.0)+"\n24 Hr Bars = "+WriteVal(inDaily/Interval(),1.0),1,5);

DisplayIndices =
ParamToggle("Display BarIndices ","No|Yes",1); // if display of bar indices is desired
if (DisplayIndices )
Title=Title+
StrFormat("
StDay1 =%g
StDay2 =%g
",StDay1,StDay2 );

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Rob
Sent: Tuesday, March 16, 2010 5:31 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Day Session or 24 Hour from AFL...?

 

 

Your zoom stuff is great... what's great about it is that you can construct any two datetimes and zoom to those values... they don't even have to be part of your AFL arrays... i.e. your arrays can be small but you zoom back to wherever you want...

The problem is constructing datetimes can be a quite clunky... especially if you want to zoom back a given number of bars... when you start looking at 24 hour vs day filtering it starts to get messy... and no-one likes messy code!!!

--- In amibroker@xxxxxxxxxxxxxxx, Herman <psytek@xxx> wrote:
>
> yeap, I give up :-)
>
> If this is still related to your original problem (zooming with blank
> bars at the right side of the chart) perhaps email support.
>
> There has to be an easier way.
>
> good luck,
> herman
>
> > As I said in my original message Herman, the problem with that
> > technique is, it's very possible that my history (I have
> > SetBarsRequired to view the minimum historical bars for speed
> > purposes), particularly when I'm in lower intervals like 1min, may
> > not have that data in it... so I cant tell unless I go to a higher
> > interval or unless I scroll the chart backwards... which obviously
> > defeats the purpose of using AFL to try and automate the process...
>
> > You see what I mean...?
>
> > --- In amibroker@xxxxxxxxxxxxxxx, Herman <psytek@> wrote:
> >>
> >> ahh,
> >>
> >> You could check if you have any bars in your Data history between 16:00
> >> and 9:30, you might have to do this only once/session.
> >>
> >> herman
> >>
> >> > No not the interval Herman... whether the chart is being displayed
> >> > (filtered) for day session only or 24 hour session...
> >>
> >> > --- In amibroker@xxxxxxxxxxxxxxx, Herman <psytek@> wrote:
> >> >>
> >> >> if( Interval() == InDaily ) ?
> >> >>
> >> >> herman
> >> >>
> >> >> > I'm talking about finding out from AFL... not manually.
> >> >>
> >> >> > --- In amibroker@xxxxxxxxxxxxxxx, "Joris M.schuller" <jmschuller@> wrote:
> >> >> >>
> >> >> >> File/Database Settings/Intraday settings/Filtering: Check which of the 4
> >> >> >> options (and Filter weekends) is selected.
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> >> >> >> Of Rob
> >> >> >> Sent: Monday, March 15, 2010 8:04 PM
> >> >> >> To: amibroker@xxxxxxxxxxxxxxx
> >> >> >> Subject: [amibroker] Day Session or 24 Hour from AFL...?
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> I'm wondering if there is a sure fire way to know via AFL if the chart in
> >> >> >> question is set to view the 24 hour session or the day session only....?
> >> >> >>
> >> >> >> Clearly where there is enough data on the chart you can look for times
> >> >> >> outside the day session to tell you, but it's very possible, and is the case
> >> >> >> in this instance, that not enough data is visible in the current array to
> >> >> >> know what the filtering mode is... the only way to know would be scroll
> >> >> >> backwards... but I want to know via AFL if possible.
> >> >> >>
> >> >> >> I need to know because I'm constructing DateTime values back a certain
> >> >> >> number of bars (outside of the current arrays) and clearly 24 hour session
> >> >> >> or day session makes a big difference...
> >> >> >>
> >> >> >> TIA
> >> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> > ------------------------------------
> >> >>
> >> >> > **** IMPORTANT PLEASE READ ****
> >> >> > This group is for the discussion between users only.
> >> >> > This is *NOT* technical support channel.
> >> >>
> >> >> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> >> >> > SUPPORT {at} amibroker.com
> >> >>
> >> >> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> >> >> > http://www.amibroker.com/feedback/
> >> >> > (submissions sent via other channels won't be considered)
> >> >>
> >> >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> >> >> > http://www.amibroker.com/devlog/
> >> >>
> >> >> > Yahoo! Groups Links
> >> >>
> >>
> >>
> >>
> >>
> >> > ------------------------------------
> >>
> >> > **** IMPORTANT PLEASE READ ****
> >> > This group is for the discussion between users only.
> >> > This is *NOT* technical support channel.
> >>
> >> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> >> > SUPPORT {at} amibroker.com
> >>
> >> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> >> > http://www.amibroker.com/feedback/
> >> > (submissions sent via other channels won't be considered)
> >>
> >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> >> > http://www.amibroker.com/devlog/
> >>
> >> > Yahoo! Groups Links
> >>
>
>
>
>
> > ------------------------------------
>
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
>
> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> > SUPPORT {at} amibroker.com
>
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
>
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
>
> > Yahoo! Groups Links
>



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___