Order Execution question

Questions about MultiCharts and user contributed studies.
bauhinia
Posts: 31
Joined: 08 Sep 2011
Has thanked: 4 times
Been thanked: 2 times

Order Execution question

Postby bauhinia » 31 Oct 2011

Hi All,

Just want to see if the following is possible:

I wish to trade a stock on data1 (XYZ Ltd) and on data2 i have another stock (ABC Ltd). I would like the code to buy and sell on data1 and realise that I cannot trade on data2, however is it possible to tell the system buy/sell the hard coded ABC Ltd stock? If so could you please give me an example of the code.

many thanks
Andrew

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Order Execution question

Postby Henry MultiСharts » 31 Oct 2011

Hello Sir.
You can use “symbol”, “symbolname” or “getsymbolname” code words to return the symbol name in your script. Then you can put this information under condition for the further calculation of you code.

Code: Select all

if symbolname="MSFT" then
buy 10 shares next bar at 9.8961 stop;

bauhinia
Posts: 31
Joined: 08 Sep 2011
Has thanked: 4 times
Been thanked: 2 times

Re: Order Execution question

Postby bauhinia » 31 Oct 2011

ok thanks,

So if i want to trade say MSFT vs IBM in the same script I can do this with what you have listed below?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Order Execution question

Postby Henry MultiСharts » 31 Oct 2011

Yes that is correct. This is a sample how you can use the symbol name as condition for your further script logic.


Return to “MultiCharts”