OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Pro Resource Forum
OmniTrader Pro Technical Support
TMS Trade Plan Error
Last Activity 6/17/2025 3:19 PM
28 replies, 1660 viewings

Jump to page : 1 2
Now viewing page 1 [25 messages per page]
 

This thread is frozen and closed to further discussion

Printer friendly version

^ Top
James S

Regular
2525
Posts: 62

Joined: 6/21/2007
Location: Dorset, England

User Profile
 
Subject : TMS Trade Plan Error
Posted : 7/27/2021 5:54 AM
Post #31538

Using the new TMS profile with IB and OT is not able to handle the partial exit trade plan.

OT is able to sell the correct amount of shares in IB so that 25% of the position remains, however the next day when I run the 'To Do List', I get the following error:

'Trade Plan for Symbol does not match the quantity with the brokers position. Please re-apply a trade plan'.

The trade then needs to be manually managed until exit which could be weeks later, far from ideal..

Attached file : TMS Trade Plan Error.jpg (584KB - 275 downloads)

^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/27/2021 1:33 PM
Post #31539 - In reply to #31538

James

FWIW

Using OT PR2H with AT running live automated trading with IB connected. NOT TMS profile but a personal highly adapted version of RS Boost (where I added T21 in it's own market state among other customizations)

After looking at the TMS video where Jeff described the positive difference the partial exit TPs made I looked at my live trading profile and changed some of my trade plans to do just that. There have been at least 10 trades where it has come into play (75% exited, 25% remained) and OT/AT/IB are all handling it perfectly. Some trades still in play, a few the 25% exited. All according to the TP. NO errors

[Edited by Buffalo on 7/27/2021 1:34 PM]

^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/27/2021 1:39 PM
Post #31540 - In reply to #31538

Also FWIW

Instead of manually managing the trade for those orphan 25% trades right click on the blue "L" on the RH edge. You can remove or edit (possibly fix - maybe just #shares is messed up?) the TP that is there (if it still is) or remove and apply a new TP - one that matches the step in the original TP (with FL and trailing profit stops). Then OT/AT will manage it from there on like normal
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/27/2021 1:57 PM
Post #31541 - In reply to #31540

Hi Buffalo

It’s my guess that some order types are more reliable than others for trade plans that do scaling in and out. I’m wary of Limit and StopLimit orders since they could get partial fills that the TP would not know about and be unable to properly manage. My testing has seen some really wierd results occasionally - even some cases where the position reversed itself.

What order types are you using?

And, do your TP’s mix scaling-in with partial exits - with the possibility of Adds in mid-trade after a prior PExit?
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/27/2021 3:10 PM
Post #31542 - In reply to #31541

Hi Jim

What order types are you using? - All Market orders

And, do your TP’s mix scaling-in with partial exits - No scaling IN

...with the possibility of Adds in mid-trade after a prior PExit? - Nope

So relatively simple partial exits - 75% out at some predetermined profit level (different on different strats) w/ a Market order, 25% trailed and out with market order too. But good testing and real world results (so far)

Hope you're doing good!


^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/27/2021 4:44 PM
Post #31543 - In reply to #31542

Thanks!

Advice re scaling in, if anyone needs it - as long as you do it before any PExits, it’s relatively easy to manage in a TP.

Afaik, from my tests, Market, StopMarket, or MOO overnight are safe and reliable.

StopLimit and Limit orders are dangerous due to potential partial fills.


[Edited by Jim Dean on 7/27/2021 4:45 PM]

^ Top
James S

Regular
2525
Posts: 62

Joined: 6/21/2007
Location: Dorset, England

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/29/2021 2:51 AM
Post #31544 - In reply to #31539

Hi Buffalo,

That's interesting to hear. I'm also on PR2H but the trade plan is not working for me.

Any chance you can post your trade plan that is working?

Thanks

James
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/29/2021 9:29 AM
Post #31545 - In reply to #31544

James

Here is a pic on a trade which exited the 75% now trailing the remaining 25%.

It has a custom OL FL stop which makes no difference for what you're asking - replace it with standard FL

EDIT while I was putting this together I got an exit on a different partial exit TP from a different strat. It was in at $94.17, 75% exit at $95.07 (1%) the next day then 25% exit 3 days later at $99.6 (5.75%)

[Edited by Buffalo on 7/29/2021 9:38 AM]

Attached file : Partial exit TP.png (448KB - 296 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/29/2021 10:26 AM
Post #31546 - In reply to #31545

Buffalo -

Pleased to see that all the SuperStop work is paying off!
^ Top
James S

Regular
2525
Posts: 62

Joined: 6/21/2007
Location: Dorset, England

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/30/2021 4:53 AM
Post #31547 - In reply to #31545

Thanks Buffalo.

I can't see any difference between your trade plan and the one I am using, however I have had the error on all 6 trades that have exited 75%.

I'm at a loss to explain it..

James
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 7/30/2021 8:59 AM
Post #31548 - In reply to #31546

Jim

I have found the ATR tightening part to work very very well!
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 8/5/2021 9:30 AM
Post #31549 - In reply to #31538

James
OK had this error happen to me last night on 3 positions that had exited the 75% and was tracking the 25%.

What changed? Before yesterday I set AT to run in the AM before market opened. Yesterday I set it to run in the PM after mkt close. Then I got these errors at 4 am long after the run was completed. At 3am ish IB does something I think bc I regularly get these OT disconnected then reconnected warnings

So I have re set AT to run in the AM. You should try it too

PS If you have to reapply a TP to the 25% you should delete the previous step (the 75% exit part) and just have the trailing stop step left, and change the order to exit 100% not 25%. That works to get a TP attached
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 8/5/2021 9:56 AM
Post #31550 - In reply to #31549

Re the original post by James, where the IB size didn't match the TP the next morning ... I'm not clear on whether that is still an issue or not. If it is, there may be a couple of reasons:

1. if the stock is thinly traded &/or stoplimit order, then you could have gotten a partial fill ... the TP does not know about that. Solution: switch to Market or Market on Open or StopMarket order type.

2. if the 25% calculation resulted in some fractional number of shares, like 50.5, then the broker may have rounded up and the TP rounded down, etc. Solution: make sure the "100%" trade-calculator size can be evenly split into whatever partial exit percentages that your TP is using.



^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 8/5/2021 1:36 PM
Post #31551 - In reply to #31550

Jim

I don't think either of those things are the issue with the TPs. OBV they could've been for James (OP) but I did not get any partial fills (I also use a vol filter to avoid thinly traded or cheap stocks) or problems with the 75/25 division of the position (the numbers totaled the original position size) on any of the 3 that errored last night (at 4am).

What I saw was AFTER the 75% exit (step 2 complete) the tradeplan showed **step 2 still active** instead of complete, so it expected to see the original position size instead of just the 25%. This caused the error of TP/position size not matching.

I never saw this when I had AT run in the AM pre-mkt open. It only happened yesterday when I had it run PM the nite prior. I think it's what I suggested - when IB does some late night brokerage stuff it does every night around 3am that is causing this issue if AT ran before this but seems to be ok when AT runs after.

We'll see tomorrow if no errors occur
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 8/6/2021 8:01 AM
Post #31552 - In reply to #31551

I run a custom version of the T21 profile on another computer to use to trade my 401k. It's connected to a paper broker but I use AT just like my IB OT install.

The 75/25 thing with TPs has worked fine until yesterday when I did a test - instead of AT running in the AM prior to mkt open I set it to run PM after mkt close for the next day.

Sure enough - got this TP error. Hasn't happened before.

Soooooo it's not an IB brokerage thing bc this is a paper acct.

Two different computers with separate OT installs running different profiles - one IB, one paper - using different strats are having this same problem IF it runs the night prior. If they run AM before mkt open NP.

Barry?
^ Top
Barry Cohen

Idol
2000100100100
Posts: 2309

Joined: 1/1/1900

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/1/2021 10:26 AM
Post #31592 - In reply to #31538

I was able to reproduce & report this issue with multistep partial exit trade plans. We're working on a fix.
^ Top
Buffalo

Elite
500100
Posts: 603

Joined: 7/11/2007
Location: Braintree, MA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/11/2021 8:06 AM
Post #31596 - In reply to #31592

Barry

I see it now each time I shut down OT and restart - any open trade that did the partial exit and has the 25% remaining will generate this error when OT restarts
^ Top
SteveL

Veteran
10025
Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/11/2021 3:31 PM
Post #31597 - In reply to #31596

Same here. Just recently started using the partial exit, and I got the same error yesterday (I had recently restarted OT). I'm glad Barry has reproduced the error.
^ Top
Barry Cohen

Idol
2000100100100
Posts: 2309

Joined: 1/1/1900

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 9:50 AM
Post #31598 - In reply to #31597

The fix is in PR2J, going live shortly. Unfortunately it will not fix trade plans that have already been disconnected.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 9:52 AM
Post #31599 - In reply to #31598

Barry:

Did the fix involve a change to the TP "engine", or to the TradePlan structure, or both? That is, could a user have made the necessary modifications?

It would help us to know more details. Thanks!
^ Top
Barry Cohen

Idol
2000100100100
Posts: 2309

Joined: 1/1/1900

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 10:11 AM
Post #31600 - In reply to #31599

It was a change in the code to fix a bug with multistep partial exit trade plans when used with a broker due to not calculating the partial exit share size properly. A user could not have made modifications to get around it.
^ Top
Barry Cohen

Idol
2000100100100
Posts: 2309

Joined: 1/1/1900

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 10:21 AM
Post #31602 - In reply to #31600

It would calculate the share size to place the trades. There's a validation check that happens with trade plans when connecting to a broker. If the number of shares at the broker is not the same as what OT thinks it should be, then it causes a disconnected trade plan. That's the piece that was failing with partial exit trade plans.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 10:39 AM
Post #31603 - In reply to #31602

Ahhh ... a tricksey roundoff-handshake error.
Good catch!

Thanks for the explanation.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 10:42 AM
Post #31604 - In reply to #31603

Barry:

SUGGESTION ... if that kind of mismatch error occurs again, PLEASE consider modifying the response-action to CLOSE THE TRADE (sell or cover all remaining shares), rather than let it continue unmanaged.

If there is debate about this, please offer it as an Option that the User can set. This is actually a pretty crucial thing. It can happen pretty often with Partial fills, which occur on thinly traded stocks OR on TradePlans that use StopLimit orders.
^ Top
Barry Cohen

Idol
2000100100100
Posts: 2309

Joined: 1/1/1900

User Profile
 
Subject : RE: TMS Trade Plan Error
Posted : 9/13/2021 10:47 AM
Post #31605 - In reply to #31604

I don't think people would be too happy if their live trades closed upon connecting OT to their broker. That's just asking for trouble.

This thread is frozen and closed to further discussion


Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.