Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I took the liberty of modifying your code where I saw fit. Along the way I had to make some assumptions because what you provided was not a complete system. I assumed you wanted to scale in to your position every time there was a hammer formation. This is controlled within your platform and not within the code. Likewise, you do not need to set intrabar order generation (IOG) to On. This can complicate things and does not affect your system. Stop orders to exit and stop entry orders are placed at the close of a bar for the next bar and are executed in realtime without IOG on. I added a trailing stop just to I could test the program.
I also modified the number of contracts to trade one contract per trade. You can easily change this back to what ever you like.
In the example image you can see the system scales into the position with 1 contract after each hammer. It sets a stop order to enter 2 ticks above the high of the hammer to enter. A hard stop is activated for the order bar only. Then a trailing stop is used for all other bars.
Let me know if you have questions. This was built with TradeStation 8.8
Many thanks again for your input. I always learn and progress with your inputs.
You where right , this exercise was not at all a trading concept, Only to described my problems to put entry on the system. I was focussing only on the technicality of orders process, nothing from the stop loss. (insane, i know, but that was the my goal. )
For about 1 hour, I chat with Dave M. from Multicharts. Using the remote toll he found that I had
IntraBarOrderGeneration = True with Bar Magnifier = 1 tick enabled at the same time. Together they mess-up the calculation and orders wheres not put or put later. That was the main problem.
Now, I could go on with my real sytem. and yes, the main part is the stop management.
Best wish of success and happiness for 2011 to you and Big Mike forum members.