Multi 10:4 Trader EA

Post Reply
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: Multi 10:4 Trader EA

Post by snailbeard »

Continuing on the theme of RSI versus STO

Interestingly, there is now also a pending sell order just below D-S1 (Mid WP-WS1),
so I have both a pending sell and pending buy.
The buy order is twice as far away (>130 pips) as the sell order (>60 pips).

I have not been through all the charts yet but if your using the EA to suggest opportunities then running it both ways gives more pairs to look at (which is how I am using it at the moment).

==================================================
18:47:35 open # buy stop 0.09 GBPUSD at 1.53140 ok
==================================================
22:00:14 open # sell stop 0.22 GBPUSD at 1.51173 ok
==================================================
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

snailbeard wrote:Continuing on the theme of RSI versus STO

Interestingly, there is now also a pending sell order just below D-S1 (Mid WP-WS1),
so I have both a pending sell and pending buy.
The buy order is twice as far away (>130 pips) as the sell order (>60 pips).

I have not been through all the charts yet but if your using the EA to suggest opportunities then running it both ways gives more pairs to look at (which is how I am using it at the moment).

==================================================
18:47:35 open # buy stop 0.09 GBPUSD at 1.53140 ok
==================================================
22:00:14 open # sell stop 0.22 GBPUSD at 1.51173 ok
==================================================

Hi Brian,

I just spoted a few of these, I'll look into it.
User avatar
McNish
Trader
Posts: 227
Joined: Tue Nov 06, 2012 3:56 pm

Re: Multi 10:4 Trader EA

Post by McNish »

MrLong wrote:AUDNZD trade? AO is below the zero line and ask is above the Ma, so we can start placing orders LONG. 10.4 rules say either stoch/rsi at the bottom or AO below zero for a long.
Maybe my bad but I haven't come across this last rule you stated. It's more like "And AO opposite color (red for long)" than "Or AO below zero for a long". I will check again at my end and report back.

None the less, apart from this, the EA is working exceptional. There are other few things but I will need to study the code to see if it is Design or Error.
LONG/SHORT, coded 1.09 to delete the stop trades if price moves below/above the MA line, but I set it to do that on a new bar, so when this bar closes, that trade should be deleted on the 1.09 version.
New bar would mean the H4 bar? Rather than hard code the Deletes, put user option to "Y/N delete Hedge Trades" after either one Sell / Buy fills. The Cable here has not yet filled either Buy or Sell trade. So now if price moves back up or goes down and fills one of them, delete the other with use input or without user input but only after either Buy or Sell filled, not before.
Thanks for your feedback, without it, it would be hard to get this EA working properly. Andy
You must be kidding man! It's people like Yourself and other Seniors here at SHF who make it worth for us to pursue the Train Wreck. Can't stress that enough. :)

Regards, Max.
User avatar
glabbeek
Trader
Posts: 104
Joined: Tue Aug 21, 2012 8:09 am
Location: In the middle of the Netherlands

Re: Multi 10:4 Trader EA

Post by glabbeek »

MrLong wrote:
TraderDesk wrote:Today 1.08a worked great... Had it set to close out my orders when 3% profit was reached and it seemed to work quite well....

Love the new releases.... :D

I like the 3% also, that way we are banking as we go and the percentage number is better because it would be relative to any size account.
Hi Andy,

I think the best way to go is to determine how much of your profit you're willing to give back. So if you are up 3% and your profit drops to 2.5%, get out. (also known as a trailing profit). Even better would be to use the ATR or ADR. This way you would't miss trades that go up like a rocket and could have given you double digit profit percentages.

An even more sophisticated approach could be adjust the trailing exit referenced to the weekly resistance levels. In between the weekly pivot and the weekly Res 1, a trailing stop of 0.25 ADR. In between Res 1 and Res 2, a trailing stop of 0.4 ADR. In between Res 2 and Res 3, a trailing stop of 0.55 ADR.

This way you give your profits room the run without giving a way to much of your winnings.
Regards,
Willem-Bram
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

McNish wrote:
MrLong wrote:AUDNZD trade? AO is below the zero line and ask is above the Ma, so we can start placing orders LONG. 10.4 rules say either stoch/rsi at the bottom or AO below zero for a long.
Maybe my bad but I haven't come across this last rule you stated. It's more like "And AO opposite color (red for long)" than "Or AO below zero for a long". I will check again at my end and report back.

None the less, apart from this, the EA is working exceptional. There are other few things but I will need to study the code to see if it is Design or Error.
LONG/SHORT, coded 1.09 to delete the stop trades if price moves below/above the MA line, but I set it to do that on a new bar, so when this bar closes, that trade should be deleted on the 1.09 version.
New bar would mean the H4 bar? Rather than hard code the Deletes, put user option to "Y/N delete Hedge Trades" after either one Sell / Buy fills. The Cable here has not yet filled either Buy or Sell trade. So now if price moves back up or goes down and fills one of them, delete the other with use input or without user input but only after either Buy or Sell filled, not before.
Thanks for your feedback, without it, it would be hard to get this EA working properly. Andy
You must be kidding man! It's people like Yourself and other Seniors here at SHF who make it worth for us to pursue the Train Wreck. Can't stress that enough. :)

Regards, Max.
Hi Max,

I've had a look at the code for the TrendDirection and the code is correct, the EA should not take a trade in the opposite direction when the price is the otherside of the MA.

I've added Pauls code to V1.09, so if it was the 10.4 RSI2_on_NT_TMA indi, that should fix the bug.

I'll add a function to stop the EA taking LONG/SHORT trades, I think the guyz in US are not allowed a hedge trade, but I'll also make it optional.

RULES FROM BOBS MANUAL:
BUY TRADES BEST CASE SCENARIO.
1. When price is above the white 240 MA line on a 4H chart, you set your pending trades with the following signal(s). The signals can be used together or separately. You do not need each one to agree to set pending trades you can go with only one signal and the 240 MA line.
2. RSI 2 is flat-lined on the bottom
3. AO is below its 0 line


Andy
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

glabbeek wrote:
MrLong wrote:
TraderDesk wrote:Today 1.08a worked great... Had it set to close out my orders when 3% profit was reached and it seemed to work quite well....

Love the new releases.... :D

I like the 3% also, that way we are banking as we go and the percentage number is better because it would be relative to any size account.
Hi Andy,

I think the best way to go is to determine how much of your profit you're willing to give back. So if you are up 3% and your profit drops to 2.5%, get out. (also known as a trailing profit). Even better would be to use the ATR or ADR. This way you would't miss trades that go up like a rocket and could have given you double digit profit percentages.

An even more sophisticated approach could be adjust the trailing exit referenced to the weekly resistance levels. In between the weekly pivot and the weekly Res 1, a trailing stop of 0.25 ADR. In between Res 1 and Res 2, a trailing stop of 0.4 ADR. In between Res 2 and Res 3, a trailing stop of 0.55 ADR.

This way you give your profits room the run without giving a way to much of your winnings.
Yes, I like the idea of a trailing percentage, kicks in when above whatever you set it at, the another setting if % drops below, close up shop.

The beauty about the percentage approach, it will work with all sized accounts, on exactly the same ratio.

Andy
User avatar
Baluda
Trader
Posts: 330
Joined: Mon Feb 06, 2012 2:00 pm
Location: An insignificant village in the Netherlands

Re: Multi 10:4 Trader EA

Post by Baluda »

@MrLong, @Simplex,

Minor issues in 'Multi_10_4_EAv1.08rsi_stoch_JM':
  • headerStr[4] should be changed when UseRSIInsteadOfStoch is set to true. 'Stoch'-> 'RSI'
  • The color of the RSI value in UpdateGrid should follow the values of RSITMAhighlevel and RSITMAlowlevel
Paul
Check the MQL4 Market for my best EA's and Indicators.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Multi 10:4 Trader EA

Post by slipshod »

Andy, quick question re GetNextResistance() and GetNextSupport()

If I read the logic correctly, shouldn't the lines that say:-

if (bidPrice - pivot < (MinimumToNextSR / PFactor(symbol))) // from GetNextResistance

... actually read pivot - bidPrice? And in GetNextSupport, bidPrice - pivot? In other words, is this part inverted compared to what it should be?

Reason being the pivots have been searched find one above and another below the price. With GetNextResistance the one above is used, and the lower one with GetNextSupport. Hence if you're looking at the one above, subtracting its value from bidPrice, which is lower than it, will always result in a negative number which makes the logic then look to the next pivot beyond it.

Also there should be checking to ensure that you're not going to go off the end of the array or beyond the start of it in the code following that if statement.

Hope I've explained that clearly.
User avatar
McNish
Trader
Posts: 227
Joined: Tue Nov 06, 2012 3:56 pm

Re: Multi 10:4 Trader EA

Post by McNish »

slipshod wrote:Andy, quick question re GetNextResistance() and GetNextSupport()
I thought for once I will beat slipshod in spotting a bloop But alas, I just missed again. :)

Same here Andy. Correcting the code, it gave 2 more trades instantly. Earlier I was thinking that probably the H/L of the bar was the check point and the pending pivots was put that afar to keep it away from spikes. If this is the original Idea, it's not bad at all really.

I get what you said about the rules to open trades. Here's another one. MA is good but no RSI, neither the AO match for the pending.
You do not have the required permissions to view the files attached to this post.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

slipshod wrote:Andy, quick question re GetNextResistance() and GetNextSupport()

If I read the logic correctly, shouldn't the lines that say:-

if (bidPrice - pivot < (MinimumToNextSR / PFactor(symbol))) // from GetNextResistance

... actually read pivot - bidPrice? And in GetNextSupport, bidPrice - pivot? In other words, is this part inverted compared to what it should be?

Reason being the pivots have been searched find one above and another below the price. With GetNextResistance the one above is used, and the lower one with GetNextSupport. Hence if you're looking at the one above, subtracting its value from bidPrice, which is lower than it, will always result in a negative number which makes the logic then look to the next pivot beyond it.

Also there should be checking to ensure that you're not going to go off the end of the array or beyond the start of it in the code following that if statement.

Hope I've explained that clearly.
Hello slipshod,

Where did the name come from by way?

//+------------------------------------------------------------------+
//| expert Get Next Resistance function
//+------------------------------------------------------------------+
double GetNextResistance(string symbol)
{
double askPrice = MarketInfo(symbol, MODE_ASK);
double digits = MarketInfo(symbol, MODE_DIGITS);

RefreshRates();
double pivot;
double top = 0;

if ( UseSR2 )
top = MR2;
if ( UseMidSR2)
top = R1;
if ( UseSR1 )
top = MR1;

for (int cc = 0; cc < ArraySize(Pivots); cc++)
{
if (askPrice > Pivots[cc] && askPrice < Pivots[cc + 1] && askPrice < top)
{
pivot = NormalizeDouble(Pivots[cc + 1], digits);

if (askPrice - pivot < (MinimumToNextSR / PFactor(symbol)))
pivot = NormalizeDouble(Pivots[cc + 2], digits);
return(pivot);
}
}
}


No this looks correct to me, because we are looking for a LONG trade, ASK would be high and pivot would be low.
Post Reply

Return to “Nanningbob 10.x”