PureBytes Links
Trading Reference Links
|
> no. when you use timeframe set you dont need to do any expansion at
> all.
Yes you do. See my other reply with the code.
> why the title does not use the timeframeset timeframe is something
> that i cannot for life of me understand.
Title variable has STRING type (so it has no "interval" concept).
On the other hand Interval(2) would return name of selected timeframe
provided it is used INSIDE timeframeset block.
You did not do that in your code. Again, see my other response for
code how to do that properly
http://finance.groups.yahoo.com/group/amibroker/message/129476
http://finance.groups.yahoo.com/group/amibroker/message/129477
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "murthysuresh" <money@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, September 08, 2008 3:59 PM
Subject: [amibroker] Re: stramge challenge with timeframes.
> no. when you use timeframe set you dont need to do any expansion at
> all.
> <quote documentation.>
> Once you switch the time frame using TimeFrameSet , all AFL functions
> operate on this time frame until you switch back the time frame to
> original interval using TimeFrameRestore or set to different interval
> again using TimeFrameSet. It is good idea to ALWAYS call
> TimeFrameRestore when you are done with processing in other time
> frames.
>
> When time frame is switched to other than original interval the
> results of all functions called since TimeFrameSet are time-
> compressed too. If you want to display them in original time frame
> you would need to 'expand' them as described later. Variables created
> and assigned before call to TimeFrameSet() remain in the time frame
> they were created. This behaviour allows mixing unlimited different
> time frames in single formula.
>
> </quote>
> why the title does not use the timeframeset timeframe is something
> that i cannot for life of me understand.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxx> wrote:
>>
>> I think you need to use TimeFrameExpand(), to expand the compressed
> weekly
>> data, before you can plot weekly data (or any longer time frame)
> onto a
>> chart.
>>
>> Also about the title, you have a daily chart, so your data base and
> dates
>> will be daily values.
>>
>> ----- Original Message -----
>> From: "murthysuresh" <money@xxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Sunday, September 07, 2008 5:11 PM
>> Subject: [amibroker] Re: stramge challenge with timeframes.
>>
>>
>> > correct url
>> > http://screencast.com/t/aB3AreAH9
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
>> >>
>> >> i have a Daily chart open with prices. i have programatically
>> > plotted
>> >> the weekly macd histo using the following formula. basically
> using
>> >> timeframeset and timeframerestore. pl note i have set the title
>> >> within the timeframe set block.
>> >>
>> >> however the title shows the daily data. the macd chart itself is
>> >> displaying weekly histo. i verified it. how do i trick the system
>> > to
>> >> show the correct bartime based on the actual plot data and in
> this
>> >> case weekly to be displayed.
>> >>
>> >> the screenshot shows the issue
>> >>
> http://www.screencast.com/users/junkone/folders/Jing/media/e8d2c670-
>> >> aac5-4e36-bfe2-98b2f5866aa5
>> >>
>> >>
>> >> if(getIntervalparam != "default"){
>> >>
>> >> TimeFrameSet( IntervaltoUse);
>> >>
>> >> }
>> >> _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g,
> Hi %
>> >> g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +"
>> > {{VALUES}}",
>> >> O, H, L, C) ) ;
>> >>
>> >> //MACD - Moving Average Convergence Divergence v1
>> >> //adapted from code by Tomasz Janeczko
>> >> //ideas by Graham Kavanagh and Terry Magic
>> >> r1 = Param( "Fast avg", 12, 2, 200, 1 );
>> >> r2 = Param( "Slow avg", 26, 2, 200, 1 );
>> >> r3 = Param( "Signal avg", 9, 2, 200, 1 );
>> >> m1 = MACD(r1, r2);
>> >> s1 = Signal(r1,r2,r3);
>> >> difference = m1-s1;
>> >> Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2),
> ParamColor
>> >> ("MACD color", colorRed ), ParamStyle("MACD style") );
>> >> Plot( s1, "Signal" + _PARAM_VALUES(), ParamColor("Signal color",
>> >> colorBlue ), ParamStyle("Signal style") );
>> >> Plot( difference,"MACD", colorBlack, styleLine | styleThick);
>> >>
>> >> Color=IIf(difference > 0,colorGreen,colorRed);
>> >> Plot(difference, "MACD Histogram", Color, styleNoTitle |
> ParamStyle
>> >> ("Histogram style", styleHistogram | styleThick | styleNoLabel,
>> >> maskHistogram ) );
>> >> Plot(difference, "", colorBlack, styleNoTitle|styleLine |
>> > styleThick
>> >> | styleNoLabel );
>> >> PlotGrid(0, colorBlack);//, styleNoTitle|styleLine | styleThick
> |
>> >> styleNoLabel );
>> >> width=Status("pxchartwidth" ) ;
>> >> Height=Status("pxchartheight" ) ;
>> >>
>> >> GfxSelectPen( colorRed, 1 );
>> >> GfxSelectSolidBrush( colorCustom1 );
>> >>
>> >> GfxSelectFont("Tahoma",15, 700 );
>> >> GfxSetBkMode(1);
>> >> GfxSetTextColor(colorGreen);
>> >> //GfxTextOut(Name() + " Close " + NumToStr(LastValue(C)) , x,
>> > y) ;
>> >> GfxTextOut( "Current MACD INTERVAL SHOWN" + getIntervalparam ,
>> >> width/2, Height/2);
>> >>
>> >>
>> >> if(getIntervalparam != "default"){
>> >>
>> >> TimeFrameRestore() ;
>> >>
>> >
>> >
>> >
>> > ------------------------------------
>> >
>> > 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
>> >
>> >
>> >
>>
>
>
>
> ------------------------------------
>
> 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
>
>
>
------------------------------------
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/
|