MarketPosition[1] and MarketPosition(1)?

Questions about MultiCharts and user contributed studies.
2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

MarketPosition[1] and MarketPosition(1)?

Postby 2haerim » 19 Apr 2009

TS allows MarketPosition(1), and MarketPositoin[1] raises compile error.

MC allows both. Is this intended?

I think allowing both is ok, but needs clarification.

Code: Select all

Var: MP(0);

MP=MarketPosition;

Print(MarketPosition, MarketPosition(1), MP, MP[1]); // ok both in MC and TS
Print(MarketPosition, MarketPosition[1], MP, MP[1]); // compile error in TS, not in MC

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 20 Apr 2009

Power Language accepts both formats, but [1] is ignored.

RWDickinson
Posts: 43
Joined: 01 Dec 2008
Has thanked: 2 times
Been thanked: 2 times

Postby RWDickinson » 20 Apr 2009

Ignored ??!!!!?? Can I possibly be understanding you? "MarketPosition[1]" is the same as "MarketPosition"? And somebody thought that was an improvement over compiler complaints about "MarketPosition[1]"? Tell me it ain't so, Joe!

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

Postby 2haerim » 20 Apr 2009

Andrew,

What do you mean by "ignored"?

MP=MarketPosition;
Print(MarketPosition, MarketPosition[1], MP, MP[1]);

What will be the output?

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Postby TJ » 20 Apr 2009

I guess it is the same scenario with noplot[1].

[1] is not supported in noplot, but the compiler won't kick it out if you have it.


Return to “MultiCharts”