OmniTrader Professional Forum
-
OmniTrader Pro General Discussion
Help with Multiple Entry Strategies |
^ Top | ||||
John W![]() Posts: 96 Joined: 6/18/2011 Location: Sydney, NSW, Australia ![]() | I've got 3 strategies that work on 6 symbols, they fire independently of each other, at different times on each symbol, although sometimes the strategies may fire together on 1 or more symbols. My plan is to enter 5% each time a strategy fires on each symbol, theoretically I could get to 90% equity if all 3 strategies have all fired on all 6 symbols. How do I set this up in the OT strategy or Portsim ATM Method? It appears that no matter what ATM Method settings I use, if a trade from one of the strategies is already in place on a symbol, OT refuses to allow another entry on that symbol from the other two strategies. I know that in OV it's possible for a symbol to have multiple strategies with multiple entries and growing position sizes per symbol, what setting am I missing in OT to make this possible? | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Hi John You can “scale in” if you set up the Trade Plan to handle it. The problem is that the second and third entry signals need to either be: 1. Driven by the canned TP Condition dropdown and radio button options - such as a Limit order when price exceeds 1 ATR beyond prior close. - or - 2. An OmniScript condition such as sma(10) > sma(20). - or - 3. An OLang Stop that can be very complex logic. Nirvana does not allow its Systems to be “called” like indicators, so if you are using three canned Systems in your Strategies, they can only trigger the initial entry. I’m assuming that you know you can set up the system block to have more than one system active, &/or create “secondary lines” in the strategy diagram that all feed into a single TP. As to Port Sim - it used to be totally unable to handle partial exits (scaling out), but could handle some simple scaling-in strats that N release a year or two ago. My guess is that if you did set up scaling-in, it’s 50/50 whether PS would model it properly. Fwiw, I do have a complete and comprehensive scaling in and out set of tools - I call it the Stradicator method (a full strategy in an indicator). It can do all those things, and much more. But it does not use canned Systems - the various entry rules have to be custom coded. I hope this helps. | |||
^ Top | ||||
John W![]() Posts: 96 Joined: 6/18/2011 Location: Sydney, NSW, Australia ![]() | Thankyou Jim for your comprehensive reply! I have also read your excellent post on scaling in elsewhere in this forum. Item 3 of your reply could be a possible answer to my question. Each of my 3 strategies is a GA. Currently I have an Olang stop working as an exit when the short component of a GA fires. I can adapt this to provide an entry also. I could call the 2nd and 3rd GA's as part of the ARM functionality e.g. GAV_Long(0,0,4,"GA2") > 0 as part of the trade plan, and have multiple strategies and trade plans to cover the 3 alternatives. Very clever idea of yours Jim, although it may be a bar or 2 late in entry. I'll play with it. It would be even better if Nirvana could transport back to OT the technology that works so effectively in Omnivest to increase position sizes when each strategy fires. Perhaps this could go on the Nirvana Christmas wish list? | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Sounds like a good plan, John ... I'm glad that works for you. You might be able to use the GA call in an OmniScript, too ... I never tried it but if it works, it's "cleaner". Keep in mind that you might not necessarily get all three scale-in signals, and they might not always be in the same order. Your TP needs to account for that ... and will be a little more complex than a typical TP as a result. I'd suggest that you pick the GA that fires earliest (if there is one) to be the "System" block that feeds the TP, for the initial entry. If you don't know which one is first, then you'll need a "generic" entry signal ... maybe use a Filter to kick the TP off, but the actual Entry wouldn't happen until one of the GA's fired. In that case, the TP would look something like this (season to taste) ... Step 1 Condition: check GA#1 ... Buy 50% ... Jump to 2 Condition: check GA#2 ... Buy 50% ... Jump to 3 Condition: check GA#3 ... Buy 50% ... Jump to 4 Condition: NBAR=30 ... failed to enter ... Jump to End Step 2 Condition: check GA#2 ... Buy 50% ... Jump to 5 Condition: check GA#3 ... Buy 50% ... Jump to 6 Condition: NBAR=20 ... no second entry ... Jump to 10 Step 3 Condition: check GA#1 ... Buy 50% ... Jump to 7 Condition: check GA#3 ... Buy 50% ... Jump to 5 Condition: NBAR=20 ... no second entry ... Jump to 10 Step 4 Condition: check GA#1 ... Buy 50% ... Jump to 6 Condition: check GA#2 ... Buy 50% ... Jump to 5 Condition: NBAR=20 ... no second entry ... Jump to 10 Step 5 Condition: check GA#1 ... Buy 50% ... Jump to 8 Condition: NBAR=10 ... no third entry ... Jump to 9 Step 6 Condition: check GA#2 ... Buy 50% ... Jump to 8 Condition: NBAR=10 ... no third entry ... Jump to 9 Step 7 Condition: check GA#3 ... Buy 50% ... Jump to 8 Condition: NBAR=10 ... no third entry ... Jump to 9 Step 8 (150% now) ... manage exits ... Jump to End Step 9 (100% now) ... manage exits ... Jump to End Step 10 (50% now) ... manage exits ... Jump to End | |||
^ Top | ||||
John W![]() Posts: 96 Joined: 6/18/2011 Location: Sydney, NSW, Australia ![]() | Gotcha. One of the GA's is more likely to fire and I could fiddle with the NBAR jump too. I'll try it out and let you know. Thanks so much!! | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Ah, good. Cleaner and simpler that way ... presuming GA#1 is used as the initial triggering System that kicks off the TP: Step 1 (system fired GA#1) ... Buy 50% ... Jump to 2 Step 2 Condition: check GA#2 ... Buy 50% ... Jump to 3 Condition: check GA#3 ... Buy 50% ... Jump to 4 Condition: NBAR=20 ... no second entry ... Jump to 7 Step 3 Condition: check GA#3 ... Buy 50% ... Jump to 5 Condition: NBAR=10 ... no third entry ... Jump to 6 Step 4 Condition: check GA#2 ... Buy 50% ... Jump to 5 Condition: NBAR=10 ... no third entry ... Jump to 6 Step 5 (150% now) ... manage exits ... Jump to End Step 6 (100% now) ... manage exits ... Jump to End Step 7 (50% now) ... manage exits ... Jump to End | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() | Make sure your Port Sim method's Strategies tab is set to "Use These Strategies" so that Port Sim will "see" each strategy's individual voteline. If it's set to "Use Portfolio Simulation Setting for Strategies then Port Sim will only "see" the main/top voteline. And for multiple trades on the same symbol, OT can't do that. It will ignore trades for a symbol if there's already a trade open on that symbol. That includes Port Sim too. | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Hi Barry, If I understand your answer correctly, you are saying that multiple add on trades do not show in the Omnitrader crystal reports, nor on the vote line advisor, nor in Port Sim (with use these strategies) with the same symbol? Is this also true for multiple partial exits, like with T21 and VBX4 or other trade plans that might have 2, 3 or more exits in the TP? Do these not show up in the vote line advisor, nor the crystal reports, nor Port Sim with the same symbol? Can you clarify what does and doesn't show correctly in these areas when a trade plan may have multiple entries and exits on the same symbol? A lot of trading decisions are based in each of these 3 areas, and it would be good to have this understood correctly by everyone. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | I believe that Barry was answering your original question, and skipping over the solution that I provided. It looked to me like he was saying that if you have three separate Strategies, they can't trade the same Symbol at the same time ... that PortSim doesn't allow it ... that sequential entries would not occur, and not be additive. The TP structures I laid out to scale-in using should work fine, but I'm NOT certain that PortSim, or even the VoteLine Advisor, will understand what's going on and properly respond to it. (For my scaling in/out projects, I've found a way to step around PortSim, so that things can be properly modelled and backtested in Excel.) However, since N *did* release a "scaling in" plugin a while back, I'd *assume* that they made sure that the Voteline Advisor, and PortSim, properly handled it. I've doubts mainly about how those two respond to scaling out. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() |
Yes that is all true. Scaling in/out in a trade plan does work (Port Sim will only show the initial entry & final exit though & not each in/out step) & Jim's earlier replies would probably work too, as long as it's one trade at a time. Meaning you have Strategy A place a trade plan & it can scale in/out with multiple steps, partial exits, etc, but while that trade is active, Strategy B's signal cannot start a new trade on that same symbol. I see your other questions, Ken, but hopefully this is clear now. Let me know if it isn't. | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Thank you Jim and Barry, I must not have read the thread carefully enough, or misinterpreted what was being said. I know you can't have multiple strategies fire simultaneously on the same symbol, as pulling up the vote line reveals which strategy actually is being taken by the symbol, and it can't have more than one. So I take it, Barry, that you are saying that multiple add on trades as well as multiple partial exits will be handled by all of the reports, port sim, and vote line advisor in OT, if similar to the TP that Jim outlined above. | |||
^ Top | ||||
John W![]() Posts: 96 Joined: 6/18/2011 Location: Sydney, NSW, Australia ![]() | Thanks Barry and Jim, great advice and I’ve been able to prove the concept, and it works. I’m not sure if every trade works as advertised but it looks very good, I will do more detailed checks on results this weekend. I’ve attached an example of a Trade Plan set out similar to your suggestion Jim, slightly modified because I have a different exit on one of the 3 long strategies. At step 5 or 6 two of the strategies use the same trailing stop to exit. At Step 5 or 7 the third strategy uses a GA that looks for opportunities to short the market as an exit signal (see the Omniscript editor box as an example how this can be done). The benefit of Jim’s approach is all 3 strategies can enter and grow position size on a symbol at different times, and exit at different times too. The only other way I know to achieve this is to upload each of the 3 strategies to Omnivest because it allows multiple strategies to independently add position sizes on a symbol, but I don’t know if OV allows partial exits (Barry, perhaps you could comment here?) ![]() | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Nice job, John! Partial exits are not very difficult in TP's unless they are mixed with scaling-in. If you scale in, that means you can end up with differing Sizes ... and each possible size needs its own dedicated Partial-Exit "path out". It gets even more complicated if the exits can occur in-between the scaling-in "adds". I've built TP's to handle totally dynamic mixes, but even when optimized, they can run into hundreds of Steps. So, I recommend that for simplicity, you choose either to use only scaling in, or only scaling out ... and if you decide to try both, REQUIRE that once the scaling out starts, no further scaling in is allowed. Final note: since OT is not very friendly if the broker Size and OT's calc'd Size are different (it disconnects the TP), do NOT use any order types, in or out, that could result in Partial Fills, or Delayed fills. MoO or Market orders are the safest route. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() |
OV is much more limited on order types & stops. It does not support partial exits or scaling in/out. The one thing though that OV can do that OT cannot is allow multiple trades from different strategies at the same time for the same symbol. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() |
Basically yes, but most of those areas will not show every in & out from a multi-step trade plan. Take for example a 4 step trade plan. The voteline will only show the beginning & end of the trade (entry signal + exit). OT will not display a visual indication there that a partial exit has taken place. The advisor window will show the steps however if you click on the voteline exit. Backtesting in all forms (reports, Strategy Wizard, Port Sim, etc) will not display or record the middle steps. They only display the entry & exit (the beginning & end of the trade when the trade plan is completed), just like the voteline display. | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Thanks Barry, that helps a lot, and is what I suspected from experience. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Hi, Barry Thanks for the detailed info ... I'm glad that PortSim and StratWiz, etc handle scaling! Just to be sure, though: even if we don't *see* the intermediate changes in position size that occur during the trade for scaling in &/or out, do PortSim calc's properly account for them? NOTABLY, if the tradeplan uses MoO, then an intermediate bar with a scaling-*signal* should have that bar's CURRENT size applied to the overnight gap price-change, and should use the NEW size (from the scaling-order) applied to the (Close-Open) price from the Next bar. IS THAT CORRECT? It presumes that the PortSim plot shows "Close to Close" net Prof/Loss. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() |
Yes. Port Sim takes all the information from each trade on the voteline. So in the case of a multistep partial exit trade, if you look at the voteline advisor exit information, that's the information that Port Sim uses to get it's entries & exits for each step & calculates them with Port Sim's share sizes. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Ok thanks. So - if the Advisor Popup is correct, PortSim is too. The last time I checked the advisor with a scaling strategy, it was really wonky. That was a couple years ago. Have you fixed it for scaling in and out now? What PR? I don’t recall seeing a note about that. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() |
Yes.
I'm not sure what you mean. Wonky how? I don't recall any fixes to partial exit trade plans save for the recent fix in 2J. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Hi, Barry ... "Wonky" definition ;~) Way back when, scaling TP's such as I showed earlier, and/or ones that did scaling out, showed incorrect prices &/or execution bars (or didn't show up at all) in the Advisor popup ... I reported it, but since N didn't care about scaling back then (my guess), it was not dealt with at the time. The VoteLine Advisor, at the time, didn't know how to deal with scaling in & out. If it does now, there must have been a time when it got fixed. This could have been any time in the past 2-3 years. That's why I asked. | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() | Ok. Again I don't recall any fixes, so my guess is what you were seeing is still not fixed, but that could be using a particular type of stop or order type. I don't see incorrect prices using the VBX-4 or T21 Partial Exit trade plans using daily bars with market or market on open. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Thanks. I did a lot of testing way back when on StopMkt and Limit orders. They might have been part of the problem. | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Jim, I just reviewed a N video the other day from 2019, and they said the Advisor had been updated that year with the release of OT 2019. Going back to the "What's New" section of help for that year, they show how the Advisor rating system was changed, and how it is now calculated. I suspect it was then that the change you are asking about occurred. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Thanks, Ken. Next time I get into TradePlan testing-mode, I'll thoroughly check it out and report here. It certainly would be nice to be able to use it, and SW, and PS, for scaled trades! | |||
^ Top | ||||
mholstius![]() Posts: 76 Joined: 6/15/2011 ![]() | Good afternoon, all… I’m catching up on my reading over the weekend and wanted to say thanks for all the info provided in this thread in just 2 days. Not sure if this suggestion might help, but maybe using SYSIND() in an indicator or system might help in calling and combining the output of multiple systems. Here’s a snag of what I got applying it to CTX-1 and VBX-4 on the SPY as a quick test; Selecting SYSIND in Omnilanguage brings up this: SYSIND("",0,0,0,0,0,0,0,0,0,0) So, I’m not sure of the parameters you’d need to apply. Maybe Barry can weigh in on that. (?) Hope everyone has a good weekend, Mark P.S I just realized that first snag was awfully large, so I've re- posted it a bit smaller. Also - I ran the SPY again using just VBX-4 since my test impressed me so much with the signals from Jeff's new system; ![]() ![]() | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | WOW! That is great, Mark! How did I ever miss that? I wonder when it was released? Do you have any other docs about it? Can it work with ANY system? I started asking for a feature like this gosh maybe ten years ago ... I'd sort of given up. I can't believe I missed this! | |||
^ Top | ||||
mholstius![]() Posts: 76 Joined: 6/15/2011 ![]() | Good morning, Jim… I believe Ed mentioned it in a video in the past (1-2 years ago???). I started using it in Omnilanguage to “overlay / view” when VBX-4 was triggering trades on an indicator I’m working on. It works great for that, but I don’t know of any documentation on it – and I’m really confused by the “default” of SYSIND("",0,0,0,0,0,0,0,0,0,0). For VBX-4 it works with either SYSIND("VBX-4",0,0,0,0,0,0,0,0,0,0) or SYSIND("VBX-4"). It doesn’t work just inserting some of the canned Nirvana system names, but I suspect that has something to do with the parameters input. It certainly has a ton of possibilities, so maybe Barry can pass on some words of wisdom…??? Mark | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Rats. Sorry to hear that it's so limited. I guess they developed it just to meet a particular R&D need, without thinking about how it might be useful for the broader user-base. Sigh. My guess is that the string of zeros is to allow for parameters to be provided for Systems that have them. But then again, maybe it's just focused on the GA "thing", and the zeroes tailor the GA-pane options somehow. Doc's certainly would be helpful! And even more so ... fixing things so that ANY SYSTEM, past or future, can be "Called" via this function. BARRY: could you please look into this, and put it on the new feature request list? Thanks | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Hi Mark and Jim, A few months ago in December, Ed made a video on Youtube: https://www.youtube.com/watch?v=g1Bz6UUHDmg entitled "OmniTrader 2021 - The Power Of System Indicator Scans" This video goes over SysInd() the most of anything I have seen, and would be a tutorial on that new functionality, and well worth watching. Please note that SysInd() has been updated since this video, so let's use Mark's example of VBX-4. To use it now, you can type SysInd("VBX-4",13,2) [the default 2 parameters, or whatever you want for the 2 parameters for the system]. It no longer needs all those extra zeros as Ed shows in the video, for the N staff have figured out how to parse the function so that as long as you have the correct # of parameters for a system call, it will work. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Thanks, Ken! I hope N creates written docs for things like this. I wouldn't think to look for a video ... nor even know where to find it. Is it still true that it won't work for "all" System types? | |||
^ Top | ||||
Ken Wilsdon![]() Posts: 16 Joined: 3/26/2018 Location: Calgary, Alberta, Canada ![]() | Hi Jim, I know it works for all that are in the System block of a trade plan. Beyond that, I don't know. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Wonderful! Thanks for the info. Barry: does SysInd() work with ALL Systems created by Nirvana, including Plugins? | |||
^ Top | ||||
Barry Cohen![]() Posts: 2308 Joined: 1/1/1900 ![]() | Ah yes, the system indicator function. That is a new feature to OT2021 & yes it was improved in PR2A to allow only the parameters needed for the specific system that it's calling. And if you don't specify any parameters it should just use the default parameters, but I haven't tested it in that way. If it doesn't work without specifying parameters then try it again with the parameters. Yes Jim, it works with any system whether it's a base system, plugin system, or OmniLanguage system. | |||
^ Top | ||||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | H*U*R*R*A*H !! |