Ok I can see that the stoploss is simply set to the moving average. When the MA is close to the price then tight stops will be set & losses taken like the one I saw. When the price decides to whipsaw across the MA in a ranging period the losses could be very high indeed.
May I suggest another value, StopBufferPips, set to ADR * 1 (with 1 being a user-definable value)? When the MA is further from the price then it'd be used to set stops, otherwise StopBufferPips would be used to prevent stops that are dangerously tight.
Btw, if UseMovingAverage is set to false, no stop would be set at all & the CalculateStopLoss function would return an unintialised value...
Multi 10:4 Trader EA
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Multi 10:4 Trader EA
Last edited by slipshod on Tue Mar 19, 2013 11:29 am, edited 1 time in total.
-
MrLong
Re: Multi 10:4 Trader EA
At what level is your MA 240, they seem to be different from broker to broker?slipshod wrote:You beat me to it, I've had a busier day than I'd expected. ADR makes a lot more sense to use than ATR, and I guess those values are as good as any for a starting point.MrLong wrote: These numbers look good:
maOuterBufferPips = GetOuterBuff(CurrentPair, 2.00);// outer parameter ADR X 2
maBufferPips = GetOuterBuff(CurrentPair, 0.25);// Inner parameter ADR X 0.25
BufferPips = GetOuterBuff(CurrentPair, 0.05);// Buffer Pips ADR X 0.05
I'm just testing now.
The EA for me had a host of trades running & at one point had an equity 7% higher than the balance, but the market seems to have changed direction with none hitting their TP and one stopping out. The losing trade was a Sell on EURJPY, which it entered at 123.456 with a TP at 119.606. With the price now 123.349 you'd think this'd be still running and in profit - the problem was that the SL was very close at 123.610, only 15 pips from the entry. This is contrary to the philosophy of 10.4 having wide stops, leading me to wonder how the stop-loss levels are calculated & how it could have gotten this one so wrong. I'll hopefully have time to look at the code tomorrow.
Btw I've tried backtesting, following the instructions given earlier in the thread, but no trades are ever placed. In visual mode the user interface just shows the frame with no text inside. Any ideas on what the cause might be?
My MA is at: EURJPY,H4, MA(240) 123.653
Weekly Mid Support 1 124.30
Weekly Mid Resistance 1 125.29
Weekly Mid Support 2 123.31
Weekly Mid Resistance 2 126.28
Weekly Mid Support 3 122.32
Weekly Mid Resistance 3 127.27
Weekly Pivot Point 124.87
Weekly Support 1 123.72
Weekly Resistance 1 125.70
Weekly Support 2 122.89
Weekly Resistance 2 126.86
Weekly Support 3 121.74
Weekly Resistance 3 127.68
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Multi 10:4 Trader EA
On EJ right now my MA 240 is at 123.780. Using Cowboy IBFX - it'll probably differ slightly for each broker based on how many Sunday candles they show.
On my local copy I've set an extern int StopBufferPips = 80 (as my version still has fixed values), and I've changed the code in CalculateStopLoss() as follows:-
On my local copy I've set an extern int StopBufferPips = 80 (as my version still has fixed values), and I've changed the code in CalculateStopLoss() as follows:-
Code: Select all
if (UseMovingAverage)
stop = MathMin(MaVal, price - StopBufferPips * Point);
...
if (UseMovingAverage)
stop = MathMax(MaVal, price + StopBufferPips * Point);- mjws00
- Trader
- Posts: 609
- Joined: Fri Jan 04, 2013 10:17 pm
- Location: Victoria
Re: Multi 10:4 Trader EA
I think we'll need to take a look at TrendDirect() as well. If useBothForPullback is enabled. We get very strong trades, but miss pullbacks where AO doesn't get over the zero line. This happens often. i.e AO only pulls back partially, but stoch which is the primary signal is saying the reversal is valid. If disabled, we get triggered anytime AO is above or below zero due to the "OR" which is not a valid setup. This occurs even when stochastic, which is the primary trigger, is overbought or oversold in the wrong direction.
I might be wrong, it was late while I was testing. But over half the pendings I checked last night were invalid. The hyper conservative useBoth, is safe but will miss trades. Fastest way to confirm and eyeball it is one of the dashboards. For example EURCAD is currently a valid 10.4 setup to place pendings, AO which is really just for confirmation after the fact is no where near above zero and likely won't be on this swing.
The auto position sizing close to the 240 is also a killer as it conveniently boosts the size when we are most likely to get stopped out. This makes losses difficult to overcome. It is as per the rules. But the lesser position size of say 100pip stop (ATR) or the distance to the 240 is much safer and doesn't increase size dramatically in the danger zone.
Hope that makes sense. I've included a picture to clarify... My hack isn't ready for primetime or I'd have posted code to help. Sorry. I pretty much just removed AO but maintained stoch integrity. Also killed TP as the R1/S1 model assumes you have knowledge of where you are placing the pending at the time, it is not universal as WP may be away from price action.
For me it is a non issue as I just want a solid entry, and then will manage the trade. For hands-off operation, or testing, exits will need work. I love the creativity in the correlation idea (but haven't seen tested it successfully). Bob has left that area full of discretion as the intent is manual. AO change to get out is poor and late, using only stoch reversal can kill runners. Most of my simple to code ideas leave too much money on the table compared to my eye.
Sorry for the novel. I've had good success with 10.4 manually. But it has its quirks as do all systems.
Mike
I might be wrong, it was late while I was testing. But over half the pendings I checked last night were invalid. The hyper conservative useBoth, is safe but will miss trades. Fastest way to confirm and eyeball it is one of the dashboards. For example EURCAD is currently a valid 10.4 setup to place pendings, AO which is really just for confirmation after the fact is no where near above zero and likely won't be on this swing.
The auto position sizing close to the 240 is also a killer as it conveniently boosts the size when we are most likely to get stopped out. This makes losses difficult to overcome. It is as per the rules. But the lesser position size of say 100pip stop (ATR) or the distance to the 240 is much safer and doesn't increase size dramatically in the danger zone.
Hope that makes sense. I've included a picture to clarify... My hack isn't ready for primetime or I'd have posted code to help. Sorry. I pretty much just removed AO but maintained stoch integrity. Also killed TP as the R1/S1 model assumes you have knowledge of where you are placing the pending at the time, it is not universal as WP may be away from price action.
For me it is a non issue as I just want a solid entry, and then will manage the trade. For hands-off operation, or testing, exits will need work. I love the creativity in the correlation idea (but haven't seen tested it successfully). Bob has left that area full of discretion as the intent is manual. AO change to get out is poor and late, using only stoch reversal can kill runners. Most of my simple to code ideas leave too much money on the table compared to my eye.
Sorry for the novel. I've had good success with 10.4 manually. But it has its quirks as do all systems.
Mike
You do not have the required permissions to view the files attached to this post.
Reading the dark heart.
-
och
- Posts: 7
- Joined: Fri Sep 14, 2012 8:19 am
Re: Multi 10:4 Trader EA
Dear all,
I start yesterday a demo on a VPS using 1.07 and not changing any of the settings :
http://www.myfxbook.com/members/och_/mt ... der/518400
I start yesterday a demo on a VPS using 1.07 and not changing any of the settings :
http://www.myfxbook.com/members/och_/mt ... der/518400
-
MrLong
Re: Multi 10:4 Trader EA
Hi Mike,mjws00 wrote:I think we'll need to take a look at TrendDirect() as well. If useBothForPullback is enabled. We get very strong trades, but miss pullbacks where AO doesn't get over the zero line. This happens often. i.e AO only pulls back partially, but stoch which is the primary signal is saying the reversal is valid. If disabled, we get triggered anytime AO is above or below zero due to the "OR" which is not a valid setup. This occurs even when stochastic, which is the primary trigger, is overbought or oversold in the wrong direction.
I might be wrong, it was late while I was testing. But over half the pendings I checked last night were invalid. The hyper conservative useBoth, is safe but will miss trades. Fastest way to confirm and eyeball it is one of the dashboards. For example EURCAD is currently a valid 10.4 setup to place pendings, AO which is really just for confirmation after the fact is no where near above zero and likely won't be on this swing.
The auto position sizing close to the 240 is also a killer as it conveniently boosts the size when we are most likely to get stopped out. This makes losses difficult to overcome. It is as per the rules. But the lesser position size of say 100pip stop (ATR) or the distance to the 240 is much safer and doesn't increase size dramatically in the danger zone.
Hope that makes sense. I've included a picture to clarify... My hack isn't ready for primetime or I'd have posted code to help. Sorry. I pretty much just removed AO but maintained stoch integrity. Also killed TP as the R1/S1 model assumes you have knowledge of where you are placing the pending at the time, it is not universal as WP may be away from price action.
For me it is a non issue as I just want a solid entry, and then will manage the trade. For hands-off operation, or testing, exits will need work. I love the creativity in the correlation idea (but haven't seen tested it successfully). Bob has left that area full of discretion as the intent is manual. AO change to get out is poor and late, using only stoch reversal can kill runners. Most of my simple to code ideas leave too much money on the table compared to my eye.
Sorry for the novel. I've had good success with 10.4 manually. But it has its quirks as do all systems.
Mike
Thanks for you feedback, I know useBothForPullback is not part of the 10.4 strategy, I just added it as an option because the idea seemed good.
We could add some code to reduce the lot size near to the MA.
The correlation stuff I have been using for quite a while to confirm entries, but because of the stop orders, I haven't done anything in this strategy, we could place the stop orders if we have the D1 correlations on our side, I do know if you are in a trade and those daily correlated pairs start to get high numbers like > 5 going in the opposite direction, the trade will get stopped, that same thing is good to confirm a trade and I think it could work well with DC's Forex Robot.
Andy
-
TraderDesk
- Trader
- Posts: 479
- Joined: Wed Nov 16, 2011 2:12 pm
- Location: Estonia
Re: Multi 10:4 Trader EA
MrLong, great work on developing this EA. I have been running 1.07 since it came out on OOB settings to spot weaknesses with the model. As you and others have iterated pending positions put near the 240ma is incurring massive draw-downs for several reasons.
Problem is the size of the position being relative to the S/L and 240ma. That has to changed where it is either fixed and/or when pending is within a certain distance of 240ma the EA can use another S/L level like weekly mid-pivot support/resistance level. In my manual trading I have done this and found it helps to keep me in the profit. Or allow the EA to disregard setting pending positions when Price is within a certain distance of the 240ma.
I am sure you are looking into this already as I had read in previous posts, just wanted to highlight my experience so far.
Great work guys....
Problem is the size of the position being relative to the S/L and 240ma. That has to changed where it is either fixed and/or when pending is within a certain distance of 240ma the EA can use another S/L level like weekly mid-pivot support/resistance level. In my manual trading I have done this and found it helps to keep me in the profit. Or allow the EA to disregard setting pending positions when Price is within a certain distance of the 240ma.
I am sure you are looking into this already as I had read in previous posts, just wanted to highlight my experience so far.
Great work guys....
TraderDesk
-
MrLong
Re: Multi 10:4 Trader EA
Hi TD,TraderDesk wrote:MrLong, great work on developing this EA. I have been running 1.07 since it came out on OOB settings to spot weaknesses with the model. As you and others have iterated pending positions put near the 240ma is incurring massive draw-downs for several reasons.
Problem is the size of the position being relative to the S/L and 240ma. That has to changed where it is either fixed and/or when pending is within a certain distance of 240ma the EA can use another S/L level like weekly mid-pivot support/resistance level. In my manual trading I have done this and found it helps to keep me in the profit. Or allow the EA to disregard setting pending positions when Price is within a certain distance of the 240ma.
I am sure you are looking into this already as I had read in previous posts, just wanted to highlight my experience so far.
Great work guys....
Thanks for your feedback, I've taken care of the large lot size near the MA, we now have a setting where below a specified pips distance from the Ma, we can reduce our lot size to traders own setting, like 0.05 or whatever.
Thanks
Andy
-
TraderDesk
- Trader
- Posts: 479
- Joined: Wed Nov 16, 2011 2:12 pm
- Location: Estonia
Re: Multi 10:4 Trader EA
Will this be in 1.08 and if so when will you post it? Or is this a code snippet I will need to add to 1.07?MrLong wrote:
Hi TD,
Thanks for your feedback, I've taken care of the large lot size near the MA, we now have a setting where below a specified pips distance from the Ma, we can reduce our lot size to traders own setting, like 0.05 or whatever.
Thanks
Andy
Thanks..
TraderDesk
-
MrLong
Re: Multi 10:4 Trader EA
Yes, in 1.08, I'm just testing right now, as soon as it runs ok, I'll upload.TraderDesk wrote:Will this be in 1.08 and if so when will you post it? Or is this a code snippet I will need to add to 1.07?MrLong wrote:
Hi TD,
Thanks for your feedback, I've taken care of the large lot size near the MA, we now have a setting where below a specified pips distance from the Ma, we can reduce our lot size to traders own setting, like 0.05 or whatever.
Thanks
Andy
Thanks..
I've also added optional filtering for trade entries to reduce risk, CandleTiger has added the RSI.
Andy