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)
Running two strategies on one chart; Has anyone done it successfully?
I've run into a huge problem with my FLEX-RENKO strat. That being that for some reason, MC doesn't seem to like my program when running on a tick by tick or IOBG basis. And because of that, I'm running into an end of day problem when the bar doesn't complete before the session ends.
So, I'm thinking of creating a second strat that will run on a tick by tick basis but only close out open positions at the end of the session. Has anyone successfully ran 2 strats on a chart at the same time? If so, is there anything I should be mindful of? Thanks
Can you help answer these questions from other members on NexusFi?
You could turn on your existing strategy as being Intrabar (tick by tick) but then wrap your coding logic to only trade and record values when the bar state changes to close. You could also specify a time to exit positions if they still exist. However, in order to ensure you strategy doesn't try to trade again during the last few minutes before closing you'll have to create a "time to trade" window.
I don't know if you're using MC or MC.NET. Since I don't know PL and only use .NET here's an example of what I mean:
There's a downside to this approach, and it may not matter much depending on how large your trading bars are. Since it calls your strategy on EVERY tick it's working a lot harder than normal.
If you're using time-based bars (5min, 10 mins, etc) you could simply add a clause at the end of your script to close out any position the last bar you know will occur BEFORE the final bar of market close. For example, if you're trading 10min bars, and crude oil it would look something like this:
if (Bars.Time[0] >= 1649)
{
if (StrategyInfo.MarketPosition > 0){
sell;
}
if (StrategyInof.MarketPosition < 0){
buytocover;
}
}
I tried tick by tick and for some reason, it stops closing out my layered positions. I'm in the middle of adding an additional filter to my current strat. When I do, I may try the two strat deal with the second strat working on a tick by tick basis to close out at end of day. I'm also considering running two data series on the chart with the first being a 1-tick chart and the second being my Flex Renko chart. since multi data strats trade on data1, then I should be good to go.
Check your IOG Settings for Exits, that might be why it's not exiting out of all positions.
Doing tick by tick in Data1 with your trading signals based on Data2 would probably work, it just adds lots of bars to the chart that would massively slow down things like optimization. If you're not using that it probably isn't an issue.
With that setup if you're using stops or limit orders they may only be persistent for a tick when the entry criteria is met. If you're using market orders or generate stop loss/profit target it should be fine as they automatically persist.