This is a work in progress. I'm using a complex ninjascript strategy to manage the trades. The basic premise of phase 1 of this project was to focus on trade management (stops, targets, emergency exits). Phase 2 is to pay more attention to risk management (read: don't take certain trades).
The work has proven that the indicator entry signal is not the most important part of making money by a long shot. My strategy uses three custom indicators and that's it. They are spread out across three time frames. A fourth time frame is used for trade management (with a 1 range size for granularity).
Some basic features of the trade management system (so far):
Up to 9 managed stops per trade
Up to 9 distinct targets per trade
Ability to specify number of contracts per target uniquely
In more detail I'll discuss:
The system can be optimized and decide based on historical data if it should use anywhere from 0 to 9 trailing stops. Let's decide it wants to use all 9 stops. It then has custom weights for each of those stops. They are cumulative, so if stop 1 has a weight of 4 ticks and stop 2 has a weight of 2 ticks and stop 3 has a weight of 4 ticks, it would look like this:
-> Once price moves 4 ticks (stop 1 weight), move stop to (entry) minus (stop 1 weight) 4 ticks
-> Once price moves another 2 ticks (stop 2 weight), move stop to (entry) minus (stop 1 weight + stop 2 weight) 6 ticks
-> Once price moves another 4 ticks (stop 3 weight), move stop to (entry) minus (stop 1 weight + stop 2 weight + stop 3 weight) 10 ticks.
Obviously it accounts for once the stop is no longer negative in relation to entry but is in fact positive and has locked in profits.
It places up to 9 individual entry orders, each with a unique name property so they can be managed independently of each other. I normally only use 3 targets but it can handle 9. The targets (in ticks) can be controlled individually, so lets say it determines that target 1 should be 6 ticks, target 2 is 12 ticks, and target 3 is 30 ticks. It will set them up that way at the beginning of the trade, and then as the trade progresses it will move the stops for all three per the stop management.
If something bad triggers, then it will first determine how many ticks of profit have already been locked in. If few ticks have been locked in (ie: not even to first target) then it will bail on the entire trade, all targets. But if some profits are locked in (past first target) then it will smartly only bail on contracts other than the runner. The last contract is left on as a runner and not bailed on in this case, so it has that extra room to breathe and perform.
On the reversals, if a stop is taken (any loss, not necessarily a full stop) then it will determine if a reversal should be taken (if it was long and got stopped, it would consider going short immediately). It doesn't follow the same rules as normal entry setups but it does filter a few obvious things. I currently have it setup to only trade 1 target on the reversal, although I am still playing with this. Many reversals are powerful moves and can run.
I hope this helps give you a lot of ideas. Understand I won't be posting the code because it represents years of learning, exercise and blood sweat and tears, and lots of money.
As I continue working on phase 2, I'll come back to this post later and update some of the risk management stuff.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
Last edited by caprica; July 27th, 2009 at 09:19 AM.
The following 5 users say Thank You to caprica for this post:
sorry forgot to answer second part. exiting trade is using same indicators. since i use mtf i have wide variety of tools because what will move a small volume chart quickly wont move a large range chart so i can avoid fakeouts and whipsaws.
The following user says Thank You to caprica for this post:
Thanks for the post and ideas. It's been a long day and I think I re-read your OP at least 3 times but I'm still a bit confused with regards to the trailing stops. Using your example, if you see 4 ticks profit - you move the stop to entry minus 4 ticks. And if you see another 2 ticks, you move the stop to entry minus 6 ticks (4 + 2). So the trailing stops are actually getting wider as the trade moves in your direction?
Hi, sorry that was poor wording probably. What I mean to say is each stop weight is cumulative, there is no going backwards. Each time the stop is moved it is always tighter inward. For purpose of optimizer a weighted stop where each level adds the prior levels is much preferred, that was the point I was trying to make so people writing MM strategies can benefit from my experience in this area.
The stops are set using CalculationMode.Price to get around some NT bugs. That is why the * TickSize is in there.