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

Re: [amibroker] Re: Exploration giving bad dates



PureBytes Links

Trading Reference Links

They are calculated the same, just that to make charts draw faster
they use only the bars ncessary to see. Unfortunately some indicators
need all bars so you use the setbarsrequired to ensure this

On 10/21/05, Barry Scarborough <razzbarry@xxxxxxxxxxxx> wrote:
> Thanks Tomasz, SetBarsRequired fixed the problem. I did not realize
> that the charts and explore were calculated differently. I always
> used the charts to verify the code I write when I combine a number
> of charts in the buy/sell logic. Nice to know.
> Thanks again,
> Barry
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
> wrote:
> >
> > Hello,
> >
> > You don't list the indicator formula you use, so it is kind of
> > hard to guess what you are doing on the charting side but anyway...
> >
> > Few things to do:
> > 1. Make sure that code used for CHART is the same as code used
> >  for AUTOMATIC ANALYSIS
> >
> > 2.
> > Add
> > SetBarsRequired( 1000000, 1000000 );
> > to charting code. This effectively turns off QuickAFL.
> >
> > This is "just in case" because of the fact that indicators use
> > QuickAFL (execution based on visible bars only plus some extra)
> > while AA uses ALL bars all the time.
> > This may lead to some very minor differences if your charts
> > are based on  recursive functions such as EMA/MACD.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Barry Scarborough" <razzbarry@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, October 20, 2005 4:57 PM
> > Subject: [amibroker] Exploration giving bad dates
> >
> >
> > >I am using one indicator, MBI, to give buy signals and MACD zero
> > > crossing to give sell signals. I plot these as positive and
> negative
> > > spikes of one bar duration. I also plot the indicators in
> separate
> > > panes so I can see if the buy and sell points are what I expect.
> > > They are exactly in the right place.
> > >
> > > Now is gets weird. I do an exploration and the buy indicator
> occurs
> > > on exactly the same dates as the chart shows. But the MACD zero
> > > crossing dates are not the same dates as the chart. Some are
> missing
> > > too.
> > >
> > > Then I plotted a MACD and use the zero crossing for both buy and
> > > sell signals and plot them as spikes and run exploration and the
> > > dates are exactly as the chart. Also the sell spikes are exactly
> the
> > > same as the MBI/MACD chart.
> > >
> > > How can explore show incorrect sell dates referenced to the
> MBI/MACD
> > > chart but correct dates on the MACD only chart?
> > >
> > > I don't know if it makes any difference but Settings is set for
> > > daily long and short with trade on the next open. All stops are
> > > disabled.
> > >
> > > // buy/sell logic is:
> > > myMBI = Cross(MBI, 45); // MBI range 0 to 100, long is up 45
> crossing
> > > myMACD = Cross(0 , MACD(6, 19)); // sell on down 0 crossing
> > > Buy = Cover = myMBI;
> > > Sell = Short = myMACD;
> > >
> > > // explore is set to:
> > > Filter = Buy OR Sell OR Short OR Cover;
> > > AddColumn(C, "Price", 1.2);
> > > AddColumn(Buy, "Buy", 1.0);
> > > AddColumn(Sell, "Sell", 1.0);
> > >
> > > Thanks,
> > > Barry
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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