If you have several strategies in one window (with Allow multiple entries when generated from a new order turned on), the back-test shows performance as each entry being independent which is correct, but any exit will exit your entire window's position. While looking further, a Profit Target or StopLoss written independently (using setstopcontract), will exit as each entry reaches it's PT or SL. This all looks great.
However, while running live, if one were to restart Multicharts or disconnect, a resync would show an averaged position among all the entries which would move the PT and SL.
Is there anyway around this? Since it back-tests in this way, shouldn't live trading work the same way?
*Remembering Strategy Positions* would be amazing..and necessary imo. Has there been any talk about a feature similar to this?
Multiple Strategies in one window
Re: Multiple Strategies in one window
This is an area where we need a bit of a workaround. I am using the PT but the concept would be applicable to chart window based trading as well. I call one signal the "trader" and the other signals are "strategists". A given symbol may have any number of strategists each trading different timeframes or strategies but there is only one trader for the symbol. The strategists for a symbol communicate their buy or sell recommendations to the trader via global variables. The trader consolidates the recommendations and places the orders. The trader also allocates positions among the strategists upon position updates. The trader also logs the positions to a file on disk so that on restart the positions among the strategists can be allocated correctly again.
Re: Multiple Strategies in one window
Henry,
Would you mind replying to my first post? I'd like to know why MC back-tests multiple strategies in a window correctly, but will not perform this way in live trading when a disconnection or a MC restart happens.
Would you mind replying to my first post? I'd like to know why MC back-tests multiple strategies in a window correctly, but will not perform this way in live trading when a disconnection or a MC restart happens.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Multiple Strategies in one window
Hello MAtricks,
I believe you already know the answer and Orion has provided good points.
MultiCharts does not store the position information across signals/instruments in order to restore it after restart of auto trading. There is no prebuilt way in MultiCharts to distribute the current average position for the instrument between individual charts/signals.
I believe you already know the answer and Orion has provided good points.
MultiCharts does not store the position information across signals/instruments in order to restore it after restart of auto trading. There is no prebuilt way in MultiCharts to distribute the current average position for the instrument between individual charts/signals.
Re: Multiple Strategies in one window
Henry
Thank you for the honest reply. You're right, I do know the answer. And you know my underlying question.. MC should remember positions. It seems essential in almost every circumstance.
-----------------------------
Now onto a short term fix:
Would using •Async and •Assume MP is the same as CHART create a situation where multiple strategies within one window be completely independent of each other which would allow a reconnection to MC where the strategies would execute as the back-test shows?
Edit:
I just tried this. Each strategy had its own PT and SL. Each position opened up as many PT and SL as I had strategies even though they weren't in a position. Any suggestions?
Edit #2:
So I think I've gotten it. Apply all signals with AA and Same As Chart positions, but do not have any Profit Target or Stop Loss code within the strategies. Create a separate "money management" strategy. The downfall here is that all the strategies within this Window will have the same size PT and SL. Henry, please confirm these points?
CAUTION for readers: Do NOT use AA unless you understand it and have written your code to deal with the downfalls of this type of broker sync.
Thank you for the honest reply. You're right, I do know the answer. And you know my underlying question.. MC should remember positions. It seems essential in almost every circumstance.
-----------------------------
Now onto a short term fix:
Would using •Async and •Assume MP is the same as CHART create a situation where multiple strategies within one window be completely independent of each other which would allow a reconnection to MC where the strategies would execute as the back-test shows?
Edit:
I just tried this. Each strategy had its own PT and SL. Each position opened up as many PT and SL as I had strategies even though they weren't in a position. Any suggestions?
Edit #2:
So I think I've gotten it. Apply all signals with AA and Same As Chart positions, but do not have any Profit Target or Stop Loss code within the strategies. Create a separate "money management" strategy. The downfall here is that all the strategies within this Window will have the same size PT and SL. Henry, please confirm these points?
CAUTION for readers: Do NOT use AA unless you understand it and have written your code to deal with the downfalls of this type of broker sync.
- Attachments
-
- AA testing.jpg
- (350.16 KiB) Downloaded 939 times
Re: Multiple Strategies in one window
Henry,
I have a question in addition to what MAtricks is asking. I understand that marketPosition and marketPosition_at_broker_for_the_strategy always stay in sync in SA mode but they can get out of sync in AA mode. I also know that in SA mode, marketPosition_at_broker_for_strategy is updated on receiving order fill report from broker. Is this also true for AA mode? In other words, marketPosition_at_broker_for_the_strategy is updated if and only if a fill report is received in either AA or SA mode?
Thanks.
I have a question in addition to what MAtricks is asking. I understand that marketPosition and marketPosition_at_broker_for_the_strategy always stay in sync in SA mode but they can get out of sync in AA mode. I also know that in SA mode, marketPosition_at_broker_for_strategy is updated on receiving order fill report from broker. Is this also true for AA mode? In other words, marketPosition_at_broker_for_the_strategy is updated if and only if a fill report is received in either AA or SA mode?
Thanks.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Multiple Strategies in one window
MAtricks,
All signals applied to one chart form a single strategy with a single MarketPosition_at_Broker_for_The_Strategy (MC auto-trading engine position). If you have StopLoss and ProfitTarget in each signal - orders will be generated by each signal with the size = MarketPosition_at_Broker_for_The_Strategy. Additional information: How Scripts Work.
All signals applied to one chart form a single strategy with a single MarketPosition_at_Broker_for_The_Strategy (MC auto-trading engine position). If you have StopLoss and ProfitTarget in each signal - orders will be generated by each signal with the size = MarketPosition_at_Broker_for_The_Strategy. Additional information: How Scripts Work.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Multiple Strategies in one window
Yes, it is also true for AA mode.marketPosition_at_broker_for_strategy is updated on receiving order fill report from broker. Is this also true for AA mode? In other words, marketPosition_at_broker_for_the_strategy is updated if and only if a fill report is received in either AA or SA mode?