Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Possible to automatically place trades on the front contract?
This is the first post on this forum (or any forum for that matter), so apologies if I'm not following standard forum etiquette.
I have coded a strategy to trade ES futures on the Daily timeframe through Tradestation. Part of the strategy uses a 200 day moving average, so it's not feasible to automate it on the current contract since its MA will never match the continuous contract's MA (since 200 days > 3 months). Is there any way to have a strategy run on @ES and for it to place trades on the active contract with no further input from me? Ideally, I would like to let the strategy run for a whole year without having to manually switch contracts every quarter.
If that's not possible, I know my other course of action would be to manually switch contracts every quarter. I would also have to use @ES as Data Stream 2 on the chart and just reference its MA in the strategy.
-Samuel
Can you help answer these questions from other members on NexusFi?
another idea could be using OrderTickets for trading (instead of a legacy strategy) and develop code that handles the rolling. This will become quite complex, though.
It will do this automatically — check the "Use this symbol for trading'checkbox:
"Use this symbol for trading - Check this setting to create a tradable symbol that includes the contract month and year along with coded rollover parameters to place orders on your custom continuous contract from the TradeStation Order Bar or via automated strategies. "
It rolls at the time according to the info you specify, but it is not automatic. You still have to manually change the symbol from something like @ESM23=11INC to @esu23=11INC, and you would have to manually enter and exit positions as appropriate.
Are you sure Kevin? From my reading of the documentation it seemed that it would change automatically, and that the symbol would change to indicate the month that was being traded. Maybe I’m wrong, but I’m pretty sure that’s what it says unless I misunderstood it.