PowerLanguage Keyword Reference - page 814  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
PaperoneJunior
Posts: 6
Joined: Mar 24 2021
Has thanked: 2 times

Mar 15 2022

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

User avatar
ABC
Posts: 733
Joined: Dec 16 2006
Location: www.abctradinggroup.com
Has thanked: 126 times
Been thanked: 415 times
Contact:

Mar 15 2022

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

User avatar
PaperoneJunior
Posts: 6
Joined: Mar 24 2021
Has thanked: 2 times

Mar 15 2022

ABC,
Thank you for confirming!

Regards,
PJ