Page 1 of 1

if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 04 2017
by maxmax68
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

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by TJ
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?

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by Smoky
TJ explanation can help other people too LoL

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by maxmax68
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

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by TJ
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.

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by maxmax68
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

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by TJ
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.

Re: if PlaceMarketOrder(True, True, value1) = True ?

Posted: Feb 05 2017
by maxmax68
Then the code is correct.
I hope for an explanation from MC Support.

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

Posted: Feb 07 2017
by maxmax68
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