NexusFi: Find Your Edge


Home Menu

 





Can you write a strategy to trade multiple markets with the same strategy?


Discussion in TradeStation

Updated
    1. trending_up 2,756 views
    2. thumb_up 7 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 4 attachments




 
Search this Thread
  #1 (permalink)
 ReximusMaximus 
SAINT LOUIS
 
Experience: Advanced
Posts: 40 since Aug 2019
Thanks Given: 7
Thanks Received: 23

I would like to develop a strategy that trades multiple markets.

For example I would like to survey a handful of futures contracts, select one, and trade that market until the strategy switches to another contract in another market.

To illustrate, let's say that the strategy determines that gold is developing the strongest trend. The strategy would enter in the direction of that trend. Eventually, the strategy determines that crude is developing the strongest trend, so we'd exit gold and enter crude.

If this is possible in TradeStation, can someone please point me in the right direction? I've tried searching to no avail.

Could you place an order on "data2" for example?

If not, maybe you can load multiple charts with the primary contract as "data1"?

Any help at all would be much appreciated!

Thanks for taking the time to read this!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
Prediction Markets & Event Contracts
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,738 since Jul 2012
Thanks Given: 1,918
Thanks Received: 7,485


ReximusMaximus View Post
I would like to develop a strategy that trades multiple markets.

For example I would like to survey a handful of futures contracts, select one, and trade that market until the strategy switches to another contract in another market.

To illustrate, let's say that the strategy determines that gold is developing the strongest trend. The strategy would enter in the direction of that trend. Eventually, the strategy determines that crude is developing the strongest trend, so we'd exit gold and enter crude.

If this is possible in TradeStation, can someone please point me in the right direction? I've tried searching to no avail.

Could you place an order on "data2" for example?

If not, maybe you can load multiple charts with the primary contract as "data1"?

Any help at all would be much appreciated!

Thanks for taking the time to read this!

Sure you could, there are a bunch of ways it can be done, here is one simple way:


1. Calculate the 50 bar $ per contract move for 4 different markets:

Data2: ES
Data3: CL
Data4: GC
Data5: KC

Whichever one has the greatest trend, trade that in the direction of that trend.

I just used $ per contract move for the trend. You could instead use point value move, percentage move, or whatever you want to use to define trend.

You'd have 4 charts, and data1 would vary on each of them. You can only trade data1.

Here is example code and workspace. I did only a bit of checking, but it looks like it enters and exits correctly, and is in only 1 market at a time.

So, make sure you check everything I have done.

I just tried this with a 50 bar trend (2.5 months of daily data), and surprisingly it is not too bad (although it loses overall in ES and GC).

Once you see what I did, you could easily expand this to more markets and customize all you wish. I just wanted to show one possible way it could be done.

GOOD LUCK!

Kevin

Please let me know if you see any mistakes. I have been up since 3 AM, so I might have some errors...

10:30 AM - Fixed a code error, uploaded new ELD and equity curve



Attached Files
Elite Membership required to download: 2019-12 BestTrend.tsw
Elite Membership required to download: Fixed BEST TREND CODE.ELD
Follow me on X Reply With Quote
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,738 since Jul 2012
Thanks Given: 1,918
Thanks Received: 7,485


Here is what the Tradestation workspace looks like:


Follow me on X Reply With Quote
Thanked by:




Last Updated on December 28, 2019


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts