tradermike![]() | Hi Greg, First my disclaimer: I have been away from the forums (and OT) for quite a while. As such I am probably rusty and my input should be taken with a grain of salt :) Alright, well unless I’m missing something(?)…what you’re looking for seems pretty straight forward to me. I think the main point of potential confusion is that if you want to use OT to cause exits to happen during the day, then you MUST use a real-time data feed – regardless of whether you are a RT or EOD user! As Matthew pointed out, Stops are processed differently & separately from the focus list. Furthermore, stops are evaluated only when (and every time) new data comes in. So if you only have a EOD feed, then stops can only be updated and evaluated at the end of day. But with a RT data feed then stops are evaluated continuously. The other hybrid option discussed here is that of manually updating your EOD feed one or more times during the day. If you do that, then each update will result in your stop conditions be evaluated. But the bottom line is, for a stop to be triggered…new data must come into OT. ---------------------------------------- Regarding your code above (post 11352) The logic is partially correct. But I’m guessing you want this to behave like a trailing stop(?). If so, then you need additional logic to only move the stop in the direction of your trade (otherwise it could move backwards). And then of course there is the extra logic to trigger the stop itself. Oh, and if you assign “ExitLevel” to your “mystop” value, then it can be plotted on a chart. ================================ BTW: I published some work on a similar Stop and Trade Plan a while back. I’m reasonably confident that this will do what you’re looking for…(as I've used it with live trading) For the community: Refinements to the XBarStop: http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=1411 In particular, take a look at the stpXBarLiveSafetyNet stop and set the parameters: Periods = 3 myOffset = 0 There’s also a sample Trade Plan there for you to review. And yes, these stops and Trade Plan were created with RT trading in mind, but the “safetynet” version should work just fine for EOD. Oh one caveat... Looking at my code now with hindsight, I see that there might be a minor logic bug? That is, I might need to reference the previous bar on my LLV calc(?). Anyway, take a look and if you’re interested, let me know and I’ll double-check my code logic. Regards, --tradermike [Edited by tradermike on 2/2/2009 4:31 PM] |