Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 17,605 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Workaround for trading CME futures using SierraChart Plugin #488315
07/16/24 11:39
07/16/24 11:39
Joined: Nov 2022
Posts: 20
Tampa Bay
B
bigsmack Offline OP
Newbie
bigsmack  Offline OP
Newbie
B

Joined: Nov 2022
Posts: 20
Tampa Bay
Here is a "clever" way to utilize Zorro's ability to use a different data source and trading source for a symbol to work around the limitation of not being able to trade CME futures using the outstanding SierraChart plugin that is available. This limitation stems from the SierraChart DTC server needing to block the quote data because of limitations imposed by the mean ol' CME. This limitation is documented in elsewhere the Zorro forum.

The workaround is documented in the Symbols section of the Help docs and in the Broker Arbitrage section.

- Source is an optional price source or broker name. It can be an online price source (such as STOOQ:), or a name from the first column of the account list. This way the same asset can get prices from broker A and can trade with broker B (Zorro S is required for multiple brokers).
- An asset can have multiple symbols that are separated by exclamation marks '!'.

It looks like Zorro S may be required unless I am confused about if there is a difference between a broker arb setup and just using a different quote and trading source. You are only trading with one broker in this setup and not multiple as with Broker Arbitrage. I did not test without Zorro S.

I have tested this method and it seems to work well. The symbol names need to be set up for each system with the "!" seperator. I chose to open an account with IB as the data provider for the symbol and trade with the SierraChart symbol.

SierraChart has an excellent service called the Trading Evaluator that can be used for testing this setup and great for performance tracking as well. You can setup multiple accounts on this service.

I used the IB TWS to try and fill out the Assets.csv file with the correct symbol data but I'm not positive the Assets setup for each symbol is correct but it seems like it is. I would enter the symbol in the Watch List in IB TWS and Right-click to get the Symbol Information. Futures symbols are always a royal pain to get right.

I then setup the IB Gateway once everything looked good as suggested in the Help docs.

If you are already trading with SierraChart then you pay for CME data there and you will also need to pay for CME data with IB. You can have as many instances of SierraChart on the same computer as you want as far as I can tell. I have one for manual trading, one for the Trading Evaluator, and even am trying out the TopStep Prop service with another instance.

Here are some example data for the Assets and Accounts files: (I was just dabbling with the grain symbols so they may be off - no guarantees with any of these symbols!!!)
Please let me know if something doesn't look right.

History\AssetsFix_futures-TWS-GW2.csv:
In the Symbol column, the Sierra Account:Symbol is first and then "!" then IB Account:Symbol. eg. SierraIB-GW:MESU24!IB-Gateway2:MES-FUT-202409-MES-CME-USD

Code
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Market,Multiplier,Commission,Symbol,Centage,Desc,
10Y,4.427,0.015625,0,0,0.015625,1.5625,77,UTC:1300-2100,1,1.5,SierraIB-GW:10YM24!IB-Gateway2:10Y-FUT-10YM4-10Y-CBOT-USD,0,Micro 10Y,
MES,5310.5,0.25,0,0,0.25,1.25,77.88,UTC:1330-2000,1,1.5,SierraIB-GW:MESU24!IB-Gateway2:MES-FUT-202409-MES-CME-USD,0,Micro ES,
MNQ,18730.5,0.5,0,0,0.25,0.5,116.82,UTC:1330-2000,1,1.5,SierraIB-GW:MNQU24!IB-Gateway2:MNQ-FUT-202409-MNQ-CME-USD,0,Micro NQ,
MYM,38842,0.5,0,0,0.5,1,55.44,UTC:1330-2000,1,1.5,SierraIB-GW:MYMU24!IB-Gateway2:MYM-FUT-202409-MYM-CBOT-USD,0,Micro Dow,
M2K,2042.3,0.5,0,0,0.1,0.5,42.9,UTC:1330-2000,1,1.5,SierraIB-GW:M2KU24!IB-Gateway2:M2K-FUT-202409-M2K-CME-USD,0,Micro Russel,
XK,1180,1.25,0,0,0.125,1.25,75,UTC:1430-1915,1,1.5,SierraIB-GW:XKN24!IB-Gateway2:YK-FUT-202407-XK-CBOT-USD,64,Mini Beans,
XC,448,1.25,0,0,0.125,1.25,75,UTC:1430-1915,1,1.5,SierraIB-GW:XCN24!IB-Gateway2:YC-FUT-202407-XC-CBOT-USD,64,Mini Corn,
XW,628,1.25,0,0,0.125,1.25,75,UTC:1430-1915,1,1.5,SierraIB-GW:XWN24!IB-Gateway2:YW-FUT-202407-XW-CBOT-USD,64,Mini Wheat,
MCL,75.38,0.01,0,0,0.01,1,140.8,UTC:1400-1930,1,1.5,SierraIB-GW:MCLQ24!IB-Gateway2:MCL-FUT-MCLQ4-MCL-NYMEX-USD,64,Micro Crude,
MNG,2.927,0.001,0,0,0.001,1,130,UTC:1400-1930,1,1.5,SierraIB-GW:MNGQ24!IB-Gateway2:MHNG-FUT-202408-MNG-NYMEX-USD,64,Micro Nat Gas,
MGC,2.927,0.1,0,0,0.1,1,90,UTC:1310-1830,1,1.5,SierraIB-GW:MGCQ24!IB-Gateway2:MGC-FUT-202408-MGC-COMEX-USD,64,Micro Gold,
MHG,4.448,0.0005,0,0,0.0005,1.25,90,UTC:1320-1830,1,1.5,SierraIB-GW:MHGU24!IB-Gateway2:MHG-FUT-202409-MHG-COMEX-USD,64,Micro Copper,
M6E,1.0807,0.0001,0,0,0.0001,1.25,90,UTC:1320-2000,1,1.5,SierraIB-GW:M6EU24!IB-Gateway2:M6E-FUT-202409-M6E-CME-USD,64,Micro EUR,
M6B,1.2718,0.0001,0,0,0.0001,0.625,90,UTC:1320-2000,1,1.5,SierraIB-GW:M6BU24!IB-Gateway2:M6B-FUT-202409-M6B-CME-USD,64,Micro BP,


Accounts.csv (SierraScalp and IB-Gateway2 are the entries referenced by the above Assets.csv example. I included more example accounts to show how that can works but you may need a unique Assets.csv file or symbol entry for each unique account that you have setup on SierraChart.):
Code
Name,Server,AccountId,User,Pass,Assets,CCY,Real,NFA,Plugin
SierraIB-GW,Sierra,0,ta:zorro h:127.0.0.1 p1:11099 p2:11097,password,AssetsFix_futures-TWS-GW,USD,0,1,SierraChart.dll
SierraScalp,Sierra,0,ta:microscalp h:127.0.0.1 p1:11099 p2:11097,password,AssetsFix_futures-TWS-GW2,USD,0,1,SierraChart2.dll
IB-Gateway,IB,ACCOUNT1,1,0,AssetsFix_futures-TWS-GW,USD,1,14,IB.dll
IB-Gateway2,IB,ACCOUNT2,2,0,AssetsFix_futures-TWS-GW2,USD,1,14,IB2.dll


Please let me know what you think or if you see anything wrong with this setup!

FYI: SierraChart has the Teton CME order routing that seems to be a good deal and very fast and solid for futures trading.

Re: Workaround for trading CME futures using SierraChart Plugin [Re: bigsmack] #488351
08/29/24 12:25
08/29/24 12:25
Joined: Nov 2022
Posts: 20
Tampa Bay
B
bigsmack Offline OP
Newbie
bigsmack  Offline OP
Newbie
B

Joined: Nov 2022
Posts: 20
Tampa Bay
I have tested this setup and it is not working as I had hoped.

It works for awhile and inevitably crashes with an error seen in the Zorro output that prints Readloop error. It is unpredictable because it can trade for some time by opening, managing, and closing trades then just crashes. When I trade the same script strictly using the IB plugin for data and execution then it works fine, but trying to get data from IB and execute with Sierra Chart plugin crashes eventually. It theoretically should work. My wild ass guess is that there may be some internal dependency within the Sierra Chart plugin where the trading is functionality is reliant on the data functionality to behave in a certain way. This is pure speculation and I am not confident that I have the ability to troubleshoot or debug the issue effectively. A crash indicates a bug somewhere especially since it works until it doesn't.

I am also seeing a Debug Assertion Failed error eventually but I'm not sure if these issues are related or not. I have not tested trading other instruments with the standalone Sierra Chart plugin outside of this dual IB/Sierra setup with futures. I may bring this up as an issue on the GitHub repo.

If anybody wants to help with this issue I can do what I can to help isolate the problem. I am an experienced QA and software engineer but debugging but this is a bit much for me right now and definitely stretches my abilities.

I plan to write a simple script in the Sierra Chart environment to just poll the Zorro log generated by the IB-only plugin setup and just send market orders to open and close the trades as this is my only real requirement for the moment.


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1