Page 1 of 1

PowerLanguage Keyword Reference - page 814

Posted: Mar 15 2022
by PaperoneJunior
Hi all,
in the PowerLanguage Keyword Reference at page 814 there is an example showing a strange usage of marketposition:

Code: Select all

if marketposition = 2 then...
Is it possible that the keyword marketposition returns a value different from -1 ; 1 ; 0 ?

The online wiki have a different example (ok for me).

Thank you in advange for the reply.

P.S.
Here is the link to the official pdf guide
https://www.multicharts.com/trading-sof ... erence.pdf

Re: PowerLanguage Keyword Reference - page 814  [SOLVED]

Posted: Mar 15 2022
by ABC
PaperoneJunior,

that is a typo. MarketPosition works exactly like described on page 792:
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the current position is specified and indicates that the current position is flat.
Regards,

ABC

Re: PowerLanguage Keyword Reference - page 814

Posted: Mar 15 2022
by PaperoneJunior
ABC,
Thank you for confirming!

Regards,
PJ