if PlaceMarketOrder(True, True, value1) = True ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
maxmax68
Posts: 163
Joined: Nov 20 2012
Has thanked: 55 times
Been thanked: 48 times

Feb 04 2017

Hello,
in a old post I found this code

Code: Select all

if PlaceMarketOrder(True, True, value1) = True then
ChangeMarketPosition(value1, close, "Final Buy");
Please, could you explain to me the conditional statement "if PlaceMarketOrder(True, True, value1) = True".

Best regards
Massimo

User avatar
TJ
Posts: 7775
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Feb 05 2017

Hello,
in a old post I found this code

Code: Select all

if PlaceMarketOrder(True, True, value1) = True then
ChangeMarketPosition(value1, close, "Final Buy");
Please, could you explain to me the conditional statement "if PlaceMarketOrder(True, True, value1) = True".

Best regards
Massimo
Have you looked up the Wiki for explanation and usage examples?

User avatar
Smoky
Posts: 526
Joined: Dec 03 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 125 times

Feb 05 2017

TJ explanation can help other people too LoL

maxmax68
Posts: 163
Joined: Nov 20 2012
Has thanked: 55 times
Been thanked: 48 times

Feb 05 2017

Hello TJ,
yes I looked in the wiki, but my question was for the conditional use =TRUE of PlaceMarketOrder that I can not find described anywhere.
Please, be so kind to explain .

Thank you
Best regards
Massimo

User avatar
TJ
Posts: 7775
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Feb 05 2017

Hello TJ,
yes I looked in the wiki, but my question was for the conditional use =TRUE of PlaceMarketOrder that I can not find described anywhere.
Please, be so kind to explain .

Thank you
Best regards
Massimo
I would say, the old code is wrong.

maxmax68
Posts: 163
Joined: Nov 20 2012
Has thanked: 55 times
Been thanked: 48 times

Feb 05 2017

I would say, the old code is wrong.
Strange, although unlikely.
The code comes from Dave Masalov

viewtopic.php?f=1&t=8414&p=42097&hilit= ... der#p42097

User avatar
TJ
Posts: 7775
Joined: Aug 29 2006
Location: Global Citizen
Has thanked: 1036 times
Been thanked: 2233 times

Feb 05 2017

I would say, the old code is wrong.
Strange, although unlikely.
The code comes from Dave Masalov

viewtopic.php?f=1&t=8414&p=42097&hilit= ... der#p42097
Then the code is correct.

maxmax68
Posts: 163
Joined: Nov 20 2012
Has thanked: 55 times
Been thanked: 48 times

Feb 05 2017

Then the code is correct.
I hope for an explanation from MC Support.

maxmax68
Posts: 163
Joined: Nov 20 2012
Has thanked: 55 times
Been thanked: 48 times

Feb 07 2017

Hello,

In the description of PL Editor I see that PlaceMarketOrder is a StdFunction that returns True/False.

I suppose that is always false.
True when it submits an order.

Best regards.
Massimo