Any Arbitrage Traders?

Questions about MultiCharts and user contributed studies.
Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Any Arbitrage Traders?

Postby Spaceant » 21 Mar 2010

Hi,

Are there any arbitrage traders here who trade pair trading, like platinum and gold; YM and ES; HSI and HHI.HK; and etc.. Could you share your trading / execution experience with us?

BACKTESTING:
Is it possible to backtest any arbitrage trading idea, say using ADE and EL collection (as I know that we can’t test on GV functions)?

MANUAL EXECUTION:
I know that Mulitcharts can’t support a strategy of executing two instruments. http://forum.tssupport.com/viewtopic.ph ... ad+trading
I have an idea of having a GV indicator that acts as a trigger to do the job. I will test it and post it later to share.

1) Again, with GV DLL, I still think that it is a bit too complicated to do the job, think of how many clicks are required to do amend the GV input. I think that it is not efficient to do the job.

2) Is it possible to use excel spreadsheet with a DDE linked with Multicharts, not sure if Multicharts support it not, to do the execution? I think it will be faster.

3) I am using IB as my broker. Will the spreadsheet TwsActiveX or TwsDde, installed with API, be faster for execution?

4) Or one of the IB order type, Combo or others (I am not familiar).

I appreciate if any of the experienced arbitrage trader can give us some inputs.

BTY, is it possible to have automation here??

SA

Spaceant
Posts: 254
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 22 Mar 2010

Here is the code for MANUAL signals that I have developed today.

You need to open two charts (I put them in one workspace), one for each symbol for the pairs (say A and B). The key indicator called GV Arb Trig in which you can plug in different numbers to initiate the trade triggers. You need to install GV DLL Version 2.2 to do the job.
Inputs: Opt(0);
Vars: SetRtn1(0);

SetRtn1=GVSetNamedInt("ArbTrigger",Opt);

Plot1(Opt);
In the first chart with symbol A, apply the following strategy GV Arb A; and set the appropriate # of contracts, say X, in the Strategy Properties.

[IntrabarOrderGeneration = True];
Vars: int Opt(0),ErrorCode(0),Int RtnVal(0);
ErrorCode=-999;

Opt=GVGetNamedInt("ArbTrigger",ErrorCode);

If Opt=1 then Buy ("LE(m)") next bar at market;
If Opt=2 then Sell ("LX(m)") next bar at market;

If Opt=5 then Sell Short ("SE(m)") next bar at market;
If Opt=6 then Buy to Cover("SX(m)") next bar at market;
In the second Chart, apply the following strategy GV Arb B, and set the appropriate # of contracts, say Y, in the Strategy Properties.
[IntrabarOrderGeneration = True];
Vars: int Opt(0),ErrorCode(0);
ErrorCode=-999;

Opt=GVGetNamedInt("ArbTrigger",ErrorCode);

If Opt=5 then Buy ("LE(m)") next bar at market;
If Opt=6 then Sell ("LX(m)") next bar at market;

If Opt=1 then Sell Short ("SE(m)") next bar at market;
If Opt=2 then Buy to Cover("SX(m)") next bar at market;
When you amend the value of Opt in GV Arb Trigger, the two strategies will initiate market entry or exit orders accordingly. The preset value of Opt is 0.

Opt=1:
Buy X contracts / shares of A;
Sell Short Y contracts / shares of B;

Opt=2:
Sell X contracts / shares of A;
Buy to cover Y contracts / shares of B;

Opt=5:
Sell Short X contracts / shares of A;
Buy Y contracts / shares of B;

Opt=6:
Buy to cover X contracts / shares of A;
Sell Y contracts / shares of B

Well, it is promitive, but I think it is better to key in necessary clicks in the two orders with TWS (I am using IB) manually.

I welcome any comments and suggested way of improvements to do the order placements / automation, etc.

Sa

masterchanger
Posts: 36
Joined: 03 Sep 2013
Location: Chicago, IL
Has thanked: 14 times
Been thanked: 12 times

Re: Any Arbitrage Traders?

Postby masterchanger » 03 Feb 2015

Hello Spaceant,

I'm a fairly new pairs trader and I wanted to thank you for sharing your code on manual entry.

Have you begun utilizing the portfolio trader module to automate your pairs trades?

MC


Return to “MultiCharts”