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
Order Execution question
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Order Execution question
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.
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;
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Order Execution question
Yes that is correct. This is a sample how you can use the symbol name as condition for your further script logic.