PureBytes Links
Trading Reference Links
|
Ed -
That's fine. I'll be glad to help when I have time. I'm about to go heads down and try to finish some end of year reconciliations for a couple of business accounts. Should have done it before, but I hate QuickBooks work !
-- BruceR
--- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx> wrote:
>
> hi Bruce,
>
> thanks for your feedback. The code I have sent to you I have adjusted considerably. That code was not working properly. I have now almost completed the problem, see chart.
>
> I will contact you on your personal Email for further discussion since I am coding someone elses idea,
>
> regards, Ed
>
>
>
>
> ----- Original Message -----
> From: Bruce
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Wednesday, December 30, 2009 2:07 PM
> Subject: [amibroker] Re: ABTool / multidimensional arrays
>
>
>
>
>
> Ed -
>
> I was able to take a quick look this morning. Here's a couple of quick thoughts and a question -
>
> 1. What you've coded is more akin to the CBT in that it loops through the bars with state machine logic. It looks like the "i" loop cans until it finds a Buy, then the "j" loop implements the scaling over the next bars until it is done with a trade, then it reverts to the "i" loop where "j" left off.
>
> 2. Since state machines like this have serial dependencies, you are probably right that you have to loop.
>
> 3. But, there is some optimization that can be done. First there looks to be some code that can be moved out of the "j" loop and executed once per Buy signal. This yields some worthwhile savings.
>
> The execution still looks fairly lengthy, so let's see there is a trick that can be used to affect a quick improvement. I need to the ask the following to see -
>
> 1. How many bars are being loaded in the tickers that you are scanning - IOW, with SetBarsRequired(sbrall,sbrall), what is the BarCount ?
>
> 2. What is approximately the longest Buy cycle - IOW, approximately how many bars between Buys taken ?
>
> When I run the change that I'm thinking about on EOD data with 18 years of history and only a couple of years displayed at a time, I get very significant speedups (3x+). If your use has similarities, then there is something interesting that we can do.
>
> -- Bruce
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@> wrote:
> >
> > Bruce,
> >
> > in the chart below I show what I mean. Upper chart is the "valuewhen" version, lower part I scale out until the cycle is finished. It is only 1 part of the scaling In/Out program, and I omitted multiple levels and scaling in but it clearly shows what I mean with a cycle. I attached the code. I do not believe it can be simplyfied,
> >
> > rgds, Ed
> >
> >
> >
> >
> > ----- Original Message -----
> > From: Bruce
> > To: amibroker@xxxxxxxxxxxxxxx
> > Sent: Tuesday, December 29, 2009 9:34 PM
> > Subject: [amibroker] Re: ABTool / multidimensional arrays
> >
> >
> >
> >
> >
> > Ed -
> >
> > I'd have to see the specific code for scale in/out to be able to tell. As I mentioned, I was just optimizing the posted code. But, I generally tell people that 95% of loops can be replaced with array logic. There are a few things (say the 5%) that I've run into that require looping. Nested looping, though, should be avoided at all costs, and a way can usually be found around it.
> >
> > You're right about ValueWhen. I used AMA2 on purpose, though, because it has some other important uses in portfolio mixes that I plan to show some examples of soon, and thought it would be good to mention it.
> >
> > Anyway, sounds like your moving along now.
> >
> > -- Bruce
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@> wrote:
> >
>
------------------------------------
**** 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:
amibroker-digest@xxxxxxxxxxxxxxx
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/
|