Long on X and Short on Y

Questions about MultiCharts .NET and user contributed studies.
lordsriram
Posts: 11
Joined: 03 Dec 2018

Long on X and Short on Y

Postby lordsriram » 06 Feb 2019

I have an automated strategy that I have, but due to IRA requirements, I cannot go short on a stock. I want all my long signals to buy only stock X and all my short signals to buy stock Y. I am using

OrderCreator.Limit(new SOrderParameters(Contracts.Default, "Buy", EOrderAction.Buy));
or
OrderCreator.Limit(new SOrderParameters(Contracts.Default, "Sell", EOrderAction.SellShort));

Is there a way to do this? Please let me know

Thanks
Sriram

User avatar
Henry MultiСharts
Posts: 9089
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: Long on X and Short on Y

Postby Henry MultiСharts » 06 Feb 2019

Hello Sriram,

In MultiCharts / Portfolio Trader your trading series is always the main data series (Data1).
If you want to trade a certain number of instruments - you need to have them all listed as Data1 (a chart open for each symbol or Data1 line in Portfolio Trader).
You can add second, third, etc. data series with XXX instrument and XXX resolution to your chart for reference only.

In MultiCharts .NET that is possible to create a study that will place orders to multiple different instruments (not only Data1 symbol).
Please refer to the TradeManager documentation and examples:
http://www.multicharts.com/discussion/v ... 48#p100799

lordsriram
Posts: 11
Joined: 03 Dec 2018

Re: Long on X and Short on Y

Postby lordsriram » 06 Feb 2019

In my example, I need to clarify, I can only execute Long positions. The strategy is such a way that it will trigger X buy and sell X or Y buy and Sell Y. In that case, do I need to have two instance of the same strategy in Multicharts.net, executing on two different stocks X or Y? Please let me know. When I back test, I can put both stocks together and run the simulation. There is also auto trading feature in Portfolio test, can I use that to have these two stocks execute on the same strategy.

User avatar
Henry MultiСharts
Posts: 9089
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: Long on X and Short on Y

Postby Henry MultiСharts » 08 Feb 2019

Sriram,

After backtesting your strategy, you can automate the order execution for it, without changing your setup.
Please refer to the following wiki info and let me know in case you have any specific questions:
http://www.multicharts.com/trading-soft ... Instrument
https://www.multicharts.com/trading-sof ... itions_Tab
Pair Trading:
https://www.multicharts.com/trading-sof ... ir_Trading
https://www.multicharts.com/trading-sof ... y_Examples


Return to “MultiCharts .NET”