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
>