Running two strategies on one chart; Has anyone done it successfully? - futures io
futures io



Running two strategies on one chart; Has anyone done it successfully?


Discussion in MultiCharts

Updated
    1. trending_up 573 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Running two strategies on one chart; Has anyone done it successfully?

(login for full post details)
  #1 (permalink)
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
 
Sinatra Fan's Avatar
 
Posts: 58 since May 2019
Thanks: 7 given, 7 received

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
$0 trades
EasyLanguage Programming
how to avoid these type of trades in algo
NinjaTrader
Brad Cowan
Trading Reviews and Vendors
Store value in variable when emas crossover easy language
EasyLanguage Programming
NT 8 Strateg Builder issue I am baffled! Anyone?
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Why dont people trade 150 ES contracts?
40 thanks
Spoo-nalysis ES e-mini futures S&P 500
36 thanks
Any long term success stories from funded traders in the …
26 thanks
Daytrading.Coach Review
17 thanks
How to work on strategy
17 thanks
 
(login for full post details)
  #2 (permalink)
 BrianBacchus 
Las Vegas
 
Experience: Intermediate
Platform: MultiCharts .NET
Trading: CL
 
Posts: 26 since Oct 2015
Thanks: 7 given, 37 received

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:

protected override void CalcBar(){

if(StrategyInfo.MarketPosition > 0){
SellPosition;
}

if (StrategyInfo.MarketPosition < 0){
BuyToCoverPosition
}

if (Bars.Status == EbarState.Close && TimeToTrade() == true){
Your Logic Here
}


}
private bool TimeToTrade()
{
TimeSpan barTime = Bars.TimeValue.TimeOfDay;

// If the range is on the same day, both expressions must be true
if (startTime < endTime)
return (barTime >= startTime) && (barTime <= endTime);

// Otherwise the range crosses midnight, and only one of
// the expressions need to be true
return (barTime > startTime) || (barTime < endTime);
}

I'm getting the TimeToTrade code from the link below which describes exactly how that portion works:
https://www.tradingcode.net/multicharts-net/trading-strategies/trade-certain-times-trading-strategy/

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;
}
}

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
 
Sinatra Fan's Avatar
 
Posts: 58 since May 2019
Thanks: 7 given, 7 received


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.

Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 BrianBacchus 
Las Vegas
 
Experience: Intermediate
Platform: MultiCharts .NET
Trading: CL
 
Posts: 26 since Oct 2015
Thanks: 7 given, 37 received

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.

Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > Running two strategies on one chart; Has anyone done it successfully?


Last Updated on October 27, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts