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

Re: [amibroker] Re: TimeFrames: Is their use flawed?



PureBytes Links

Trading Reference Links

Hello,

Thank you for your post.
That kind of explanation of what you are after I was expecting and I am glad you posted it because
now we can discuss facts not opinions. I was not expecting appologies, but just the information what you are after and you delivered 
it now.
Thank you.

To the matter - there seems to be some kind of misunderstanding what AmiBroker's built-in time frame functions
are for. To make it straight - they are provided to build the systems based on many time intervals in exactly the same
way as human would do, looking at 2 or more charts at the same time.
Imagine you have the system that looks onto daily and weekly chart. That is exactly the purpose of time frame functions.
So time frame functions allow you to get the "weekly" data from within "daily" chart. As in weekly chart, there is ONE
open, ONE close, ONE high and ONE low PER WEEK. That is exactly what you would see on the weekly chart if
you combined daily and weekly "by eye".
Not only that, you will know weekly high/low and close values only when week has ended (on Friday close).
And that is exactly how AmiBroker's timeframe functions work - they give you the value of higher timeframe
at the bar when higher interval is completed.
The manual
http://www.amibroker.com/guide/h_timeframe.html
gives example of so called "triple Elder screen" that combines signals generated in daily and weekly timeframes.

What you are doing with your functions is different, you are not creating higher timeframe data at all.
What you do is some gated data sampling. The following code will generate something like that,
you will get upto 5 different "weekly" values per one week, instead of one, as you wanted:

newframe = TimeFrameExpand( BarIndex(), inWeekly );
newframe = newframe != Ref( newframe, -1 );

SteppedHigh = HighestSince( newframe, High );
SteppedLow = LowestSince( newframe, Low );

Plot( SteppedHigh, "SteppedHigh", colorBlue );
Plot( SteppedLow, "SteppedLow", colorBlue );
Plot( C, "Price", colorBlack, styleCandle );

There are two caveats however:
- such approach is not equivalent to "normal" mutiple timeframe system that only uses data from *completed* interval
- as Dennis pointed out in his reply, such approach may very quickly lead to classic future leak error,
because you may be using your "quick weekly" data before they are settled.

(The above uses daily/weekly intervals for illustration purposes, but the same applies to any time frame).

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "jorgen_wallgren" <jorgen.wallgren@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, August 13, 2009 4:18 PM
Subject: [amibroker] Re: TimeFrames: Is their use flawed?


If I have offended you, I am sincerely sorry! AmiBroker is the best program available and I love working with it!!! Nothing wrong 
with AB!!!

One of the reasons the TF Functions didn't do the job in my specific case was that my systems works with 1, 5 and 15 minute 
timeframes. In the chart I need to see (and save) all the values from all the TFs plotted with 1 minute resolution. Basically to 
plot the TF data as a staircase is probably the best way to display the results for easy viewing and it's actually often so that 
some TF values in a 1 minute resolutions often very closely follow a staircase pattern- such as a Moving Average. But the AB TF 
Functions gives me the last value for each period. I needed more. Now when I have all values in each period it reveals huge amount 
of information when the three time frames are plotted in one indicator with the same data resolution. For example instead of 1 value 
for a 15 minute period, I have now 15 values.

Then I wouldn't like to go so far to prove my point by publish the work and system I have been working on for months. I have a 
system which seems to work rather well and I am sorry, but that one I will keep for myself. I could send anyone who wants a screen 
capture of the indicator with data from 3 TFs plotted.  But such a screen capture could be faked. So I will instead give a short 
explanation how easy it is to create what I was looking for. And the reason it was easy to create, after I figured it out, was 
because AmiBroker is a great program with fantastic features.

First of all, I use AB TF Functions to get the BarIndex in each TF. By having that I can tell when each TF has a new period, and any 
holes doesn't matter. Then I just go in a loop from first visible bar - as many bars I need extra, until end of the array. So in 
this loop when a new period is detected, I jump 1 step back and collect the values I need and the jump is equal to the TF I need 
data from. Here is a part of that code:
if ( NewTFBar[i] )
        {
            for ( n = i; Counter < Periods AND n >= 0 ; n-- )
            {
                if ( NewTFBar[n] )
                {
                    SUMA = SUMA + Close[ n - 1 ];
                    if ( Counter < BBPeriods - 1 )
                        SUMB = SUMB + Close[ n - 1 ];

                    Counter++;
                }
            }
     Etc.
I hope that settles it and again it's not my intention to talk bad about AmiBroker or to insult anyone.

Regards,

Jorgen



--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> wrote:
>
> Hello,
>
> TimeFrame functions work perfectly.
> You may not understand them but it is not the reason to send such unjustified opinions.
>
> If you "wrote your own" why don't you publish your formulas so everyone can judge?
> Otherwise it is just plain useless talk.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "jorgen_wallgren" <jorgen.wallgren@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, August 13, 2009 10:59 AM
> Subject: [amibroker] Re: TimeFrames: Is their use flawed?
>
>
> > Herman, I agree with you and I have the same questions. I have been working on a RT system using data from 2 additional time
> > frames and the result was very clear! I can't use the AB TimeFrame Functions and get a system which works in real time and can
> > also be properly be back tested.
> >
> > Therefore I wrote my own TimeFrame Function and now when I have the data from the 2 longer timeframes in the same resolution as 
> > my
> > chart interval, 1 minute,  everything works very well.
> >
> > Regards,
> >
> > Jorgen
> >
> >
> >
> >
> > ------------------------------------
> >
> > **** 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

<*> 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/