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

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

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

Postby maxmax68 » 04 Feb 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: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

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

Postby TJ » 05 Feb 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: 517
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 121 times

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

Postby Smoky » 05 Feb 2017

TJ explanation can help other people too LoL

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

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

Postby maxmax68 » 05 Feb 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: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

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

Postby TJ » 05 Feb 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: 20 Nov 2012
Has thanked: 55 times
Been thanked: 48 times

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

Postby maxmax68 » 05 Feb 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: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

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

Postby TJ » 05 Feb 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: 20 Nov 2012
Has thanked: 55 times
Been thanked: 48 times

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

Postby maxmax68 » 05 Feb 2017

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

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

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

Postby maxmax68 » 07 Feb 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


Return to “MultiCharts”