Can the "ORDER LABEL" be a string variable

Questions about MultiCharts and user contributed studies.
mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Can the "ORDER LABEL" be a string variable

Postby mefTrader » 03 Apr 2012

If we have something like

Code: Select all


Sell ("Exit") 100 shares this bar on close
Can the 'Order Label' i.e "Exit" be a string variable ??

e.g

Code: Select all

vars: string order_label("");

order_label="ThisExit";
order_label=NumtoStr(1,0);

Sell (order_label) 100 shares this bar on close;
Would this work do you think?

If so what is the limit to the number of characters?
Thanks

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Can the "ORDER LABEL" be a string variable

Postby TJ » 03 Apr 2012

If we have something like

Code: Select all


Sell ("Exit") 100 shares this bar on close
Can the 'Order Label' i.e "Exit" be a string variable ??

e.g

Code: Select all

vars: string order_label("");

order_label="ThisExit";
order_label=NumtoStr(1,0);

Sell (order_label) 100 shares this bar on close;
Would this work do you think?

If so what is the limit to the number of characters?
Thanks
if you can use a string variable as order reference,
when something goes wrong, it would be impossible to trace and debug.


Return to “MultiCharts”