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

Re: [amibroker] Re: Custm backtester - calling methods and properties



PureBytes Links

Trading Reference Links



Thanks for clearing that up, Mike!
 
CBT documentation is pretty vague sometimes, imho.
 
Markus
----- Original Message -----
From: Mike
Sent: Sunday, November 08, 2009 7:34 AM
Subject: [amibroker] Re: Custm backtester - calling methods and properties

 

You can call object methods anytime you have a valid object. The question is, where did the trade object come from?

It is perfectly valid, for example, to do something like:

trade = bo.GetFistTrade();

for (sig = bo.GetFirstSignal(i);sig; sig = GetNextSignal(i)) {
...
if (trade.GetPositionvalue() >= 50000)
sig.PosSize=0;
...
}

--- In amibroker@xxxxxxxxxps.com, "Markus Witzler" <funnybiz@xx.> wrote:
>
> Hello again,
>
> I have always been under the impression that trade properties/methods can only be called within a trade loop and signal properties/methods can only be called in a signal loop.
>
> But in the documentation in the "users knowledge base", I found this:
>
> for (sig = bo.GetFirstSignal(i);sig; sig = GetNextSignal(i))
> ...
> if (trade.GetPositionvalue() >= 50000)
> sig.PosSize=0;
> ...
>
> Wouldn´t one need a trade loop to be able to call GetPosiotionValue which is a trade method, or can methods/properties be called from any kind of loop (trade or signal)?
>
> Thanks
>
> Markus
>
>
>
> __________ Information from ESET Smart Security, version of virus signature database 4581 (20091107) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>



__________ Information from ESET Smart Security, version of virus signature database 4583 (20091108) __________

The message was checked by ESET Smart Security.

http://www.eset.com


__________ Information from ESET Smart Security, version of virus signature database 4583 (20091108) __________

The message was checked by ESET Smart Security.

http://www.eset.com


__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___