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

[amibroker] Re: Help : Trying to plot a 15 min StochD on a 3 min chart



PureBytes Links

Trading Reference Links

When I do the comparsion of a native 10 min chart and the 3 min chart
with the expanded 10 min StochD they are both using the same values
for StochD(15, 3, 3).  I'm also only comparing when the 10 min chart
and the 3 min chart should be equal, i.e at 10 min time frames. So at
the 10 min bar at 1:20 for the StochD it should match up with the 1:27
bar of the expanded 10 Min StochD on the 3 min chart. It doesn't.

When I compare the 10 min chart to a 2 min based chart with the 10 min
expanded StochD I get the same values at the last bar before a 10 min
close. For example, at the time 2:00 on the 10 min chart the StochD is
the same value at time 2:08 on the 2 min chart, as expected.

For this to work, all data must be derived from the 1 min bar and if
done correctly you should be able to get it to match up. Your not
trying to divide the 10 min bar into the 3 min bar, you are having to
calcuate every 10 min and 3 min bar based on the 3 min timeframe. 

I have just completed this for my own trading program that is working
with IB's API but I wanted to see this charted on Amibroker on one
chart. This also works correctly on Esignal but I don't want to use
the data from them since they charge extra for some futures and forex
data. 

I was hoping that I was doing something wrong but I can't see anything
yet.

Thanks,
Mark




--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> From my experiences the expanded timeframe will use the nexat
> available bar time, if the underlying periods are not a normal factor
> then your 10 minute will not show as consistent 10 minute on the 3
> minute chart, cannot plot a chart with 3.33333 bars on x axis.
> 
> When you change to 10 minute bar periods for the chart, if you are
> trying to compare the 2 plots in this AFL, they have different inputs
> so will never show as the same
> tstoch10 = StochD( 15 , 3, 3);
> 
> tstoch = StochD( 15 , 5, 9);
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> 
> On 25/01/07, Terry <MagicTH@xxx> wrote:
> > I think you can't change an array from the same array.
> > Try a different name for the expansion such as:
> >
> > /* expand T2 stoch */
> > tstoch10expanded = TimeFrameExpand( tstoch10, 

T2);
> > --
> > Terry
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> > Of mbluhm2001
> > Sent: Wednesday, January 24, 2007 10:32
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Help : Trying to plot a 15 min StochD on a 3
min chart
> >
> > I'm trying to plot the 10 min StochD onto a 3 min time frame chart
> > using the code below. I get the two StochD but when I compare the 10
> > min StochD on this chart to a 10min chart with the StochD they don't
> > match. Can someone tell me what I'm doing wrong?
> >
> > Thanks,
> > Mark
> >
> >
> >
> > _SECTION_BEGIN("Test");
> >
> > T2 = 600;  // 10 min
> >
> > TimeFrameSet( T2 );
> > tstoch10 = StochD( 15 , 3, 3);
> > TimeFrameRestore();
> >
> > /* expand T2 stoch */
> > tstoch10 = TimeFrameExpand( tstoch10, T2);
> >
> > tstoch = StochD( 15 , 5, 9);
> >
> >
> > Plot( tstoch10, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
> > ParamStyle("Style") );
> > Plot( tstoch, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ),
> > ParamStyle("Style") );
> >
> >
> > _SECTION_END();
> >
> >
> >
> > 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
> >
> >
> >
> >
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.9/650 - Release Date: 1/24/2007 4:06 PM