When creating a new thread, note which subforum you are in. Here is a short list of suggestions:
- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading
Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).
This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.
-- Big Mike Trading
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
This is the type of flexibility I was adding to NT using the LOM. This can only be done with unmanaged transactions which require a lot of overhead in NT7. The LOM project on futures.io (formerly BMT) is designed to encapsulate that complexity and give very complex transactions with minimal programming effort.
I will bring your attention to 2 functions:
publicvoid SetAutoSLPTTicks(int m_StopLoss, int m_ProfitTarget,int m_PositionNumber)
publicbool GoMarketBracket(int m_SharesTraded,double low,double high,int m_PositionNumber)
Use the first function in LOM to set your automatic SL & PT in Ticks. The 2nd function would be in your main OnBarUpdate () or OnMarketData() functions to set the High & Low brackets you wish to enter. Once the order is filled, LOM will set the SL & PT correctly depending if the Short or Long was entered based upon your bracket.
Here is some simple code that does what you want. It has no stop-loss / profit-targets, and it doesn't display the opening range on the chart, but those are easy to add yourself.
I could be missing something, since others seem to think it isn't possible, but it seems to work for opening an order based on your criteria. Adding a profit target should be as easy as picking the amount away from your entry. I wrote it from the ground up, and I have to profess, I don't know anything about "unmanaged transactions" so tell me if I missed something.
As it is currently written, it will enter the trade, and then in the analyzer, close it at the end of day if you have it set to do so.
Hope it helps.
The following user says Thank You to fctrader for this post:
For fun... Here it is with a 4 tick Profit Target and a 4 tick Stop Loss. Because it has targets and losses, I have made it so that it only goes long once per day, and short once per day. If you want it to only trade on the first break, change both the "LongTrade" and "ShortTrade" to be just TodaysTrade, and you will get only one trade per day.
The following 3 users say Thank You to fctrader for this post:
Your approach here works, but your OCO bracket is driven by your PC. These are not live orders on the market, but you go Long/Short when you detect the event. You could set this to run per tick to minimize slipage if you have a large movement on one bar.
I think the intent was to have two live StopLimit orders, one in each direction to catch the break out. Not sure, if this works for the person starting the thread it certainly works with those limitations.