Current location | Thread information | |
![]() ![]() ![]() ![]() ![]() ![]() |
Last Activity 12/17/2020 7:15 AM 6 replies, 2564 viewings |
|
|
Printer friendly version |
^ Top | |||
Shawn![]() Member Posts: 13 Joined: 2/18/2009 Location: Grande Priarie, AB. ![]() |
hello, i need to create a stop in my trade plan. i have an omniscript created to sell 100% when the close price is less then the 5 day ema. right now it looks like this, but gets in a trade and exits next day even when it shouldn't: C > EMA(5) can someone help me find out why it is exiting this trade soley on that script even when it shouldn't? thanks, shawn | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Hi, Shawn: There could be a lot of reasons. You might need to provide more detail :~) First and most important ... are you using an RT feed, or EOD feed? If EOD, are you downloading in the middle of the day as well as after the market has closed? If you're using RT, or doing multiple EOD downloads/day, then every new price-tick during your bar's formation represents a NEW, temporary "Close" price ... think of it as the "Last" price, if that helps. Also, along the way, High & Low can gradually change. In that case, if you'd like to change your OmniScript exit condition to match what's really happening, just use H > EMA(5). You may not WANT that logic, but it probably will help you see consistent, understandable results. For the short side, use L < EMA(5). If you are using EOD feed, then as long as you don't do any extra downloading during the day, it's OK to use "C" in the formula. There are other, more complex ways around this, but they call for OmniTrader Pro and some fancy-footwork with custom OmniLanguage. If this explanation does not seem to apply to your situation, then you'll need to attach complete info about your Trade Plan (a snapshot or two usually suffices - or you can attach the C:\Program Files\Nirvana\OT2010\TradePlans OTT file that you are using). I hope this helps. [Edited by Jim Dean on 4/13/2010 8:44 AM] | ||
^ Top | |||
Shawn![]() Member Posts: 13 Joined: 2/18/2009 Location: Grande Priarie, AB. ![]() |
thanks for you help.... i have end of day data feed that i d/load @ the end of the day. i have changed the script to H > EMA(5), but still won't work. then, i moved the periods to as high as 30, where i know i should get a response, but nothing. it stil buys, then sells next day no matter what. i have attached my trade plan. can you help? thanks! shawn ![]() | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Hi, Shawn: I'm pretty sure this can be solved ... but I need the whole picture. Thanks for the TP ... but it did not have a OmniScript condition in it ... there were no conditions for the entry, and there were two canned conditions in step 2: Fixed Loss and a MA Crossover. Both of them were MOO. I thot you said you had an Exit condition C > EMA(5) for a short exit ... does that show up in your TP as an additional condition in Step 2? Maybe the OTT file "dropped it" somehow. ANYWAYS, try this ... if you want an exit on the SAME day, then you have to do one of several things differently: 1. If you can do an EOD download BEFORE the close, for instance at about 3:45pm EST, then OT should apply any exit rules for any active Integrated Brokerage trades, at the Open of the NEXT day, since you are using MOO. If you want the exit applied on the SAME day, then change the MOO exit orders to MOC or to Market, and do that download ahead of time. 2. If you can't do the download early, then the best you can expect is to exit at the open of the NEXT day ... your existing setup is probably waiting one MORE day ... so change the order to Market and see if that solves it. 3. If you own OT Pro, you can use OmniPilot to automate that #1 download, etc ... this does involve some simple "programming" that MattG can help with ... but it does allow things to be done unattended that you would have been able to do manually. 4. If you upgrade to RT feed, you can leave your machine running during the day, tied to your broker via IntegB, and it will be able to exit either at the time the price first crosses the EMA threshold, OR with a MOC order for that same day. MOO orders for the NEXT day, done mid-day are not accepted by some brokers - you need to check on this with your broker. I hope this helps ... if not, there are other things to try ... but please consider these first. If they don't work, then you'll need to provide your complete Strategy and any custom scripts, etc you use, so that I can dup what you're seeing. | ||
^ Top | |||
Shawn![]() Member Posts: 13 Joined: 2/18/2009 Location: Grande Priarie, AB. ![]() |
i have set my trade plan up to reflect buy @ open next day, and sell on open next day when the plan plays out. i'll list below, me trade plan for a clear picture for my EOD plan for my long trades. 1. enter trade when 9 day EMA crosses the 18 day EMA. 100% buy, GTC. Buy Market on open next day. 2a. Initial FIXED stop loss is the lowest low of the last 3-5 bars. (this is a fixed stop loss that will never move). 100% sell Market order @ open next day "if" triggered. GTC. 2b. 100% sell Market order on open of next day "when" "End of Day" close falls below the 5 day EMA. GTC. i have both Intra day and EOD data feed. But i only use the download once a day @ night to review. it is primarly 2b. that i need the most help with, but 2a. aswell if very easy. I see the other options you have posted, doesn't yet reflect what i need to accomplish. hope i have given enought infor. for you this time. sorry. thanks, shawn | ||
^ Top | |||
Shawn![]() Member Posts: 13 Joined: 2/18/2009 Location: Grande Priarie, AB. ![]() |
ps. i have only o/t 2009 real time ("NON" pro edition). | ||
^ Top | |||
Jim Dean![]() Sage ![]() ![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() |
Let's just focus on your exit rather than your entry. If you download once a day, in the evening, and you want to exit at the next open (about 12hrs away), then you should use a MARKET order. There is a long, drawn-out explanation for this, but just give it a try. If it does not work properly, then it may be due to a difference between 2009 and 2010. I strongly recommend an upgrade, either way. You should not need Pro for this. If this does not work, then please attach your Strategy file. It's too time consuming to guess and write and guess and write. I will be limited to testing on 2010 ... but if I can dup your problem then I'm more likely to be able to help you. Those OTS files are stored in the C:\Program Files\Nirvana\OT2010\Strategies folder. If it's huge you might need to Zip it before attaching it to the post. Click the Attachments box before clicking Submit ... then browse and attach the file ... then click Back, then click Submit. Don't give up ... it's do-able. [Edited by Jim Dean on 4/15/2010 6:20 AM] |
|
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
![]() |
Toggle e-mail notification |