Forex Factory (https://www.forexfactory.com/forum.php)
-   Commercial Content (https://www.forexfactory.com/forumdisplay.php?f=158)
-   -   Trading Made Simple EA by Guess Whom (https://www.forexfactory.com/showthread.php?t=292301)

SteveHopwood Apr 30, 2011 7:27pm | Post# 1

Trading Made Simple EA by Guess Whom
 
2 Attachment(s)
I received this pm earlier today:

"Hi Steve
Iím sure youíre aware of the Trading Made Simple thread and I know that eelfranz has requested that contributors reframe from posting EAís and indicators, but from my manual back testing there is a way to trade this so that it can be automated and very profitable.
Unfortunately, Iím no coder so all I can specify is the rules and the indicators that contain the code to be built into the EA. Itís nowhere near as complicated as some of the other bots that youíve created and worked your magic on.
Indicators
TDI Green Red - from the Trading Made Simple thread
Synergy_APB - from the Trading Made Simple thread
Simple MA 5 shifted 2 Ė standard MT4
Lawgirls trend display v1.02 Ė Lawgirls Trading Naked thread

The trading rules are as follows;
Entry for BUY if
green crosses red,
And green is angled between 1 & 2 on a clock face (Law girls ind has this logic as itís used to display RSI arrows)
And Synergy candle is coloured Blue (buy)
And previous blue candle has closed above the shifted SMA
If the last 2 conditions arenít met wait for candle to close and then test again. Abandon after that (i.e. ignore trade if youíre having to read the 3rd candle after the green red cross)
Stops
SL is n pips (n selectable) below the last but one candle (i.e. if trade opens on candle 0, SL is low of candle -2)
Once trade is positive by 20 pips, trail the stop to the bottom of the previous Blue candle.
Exit
Exit when SL hit or candle closes below the SMA.
For SELLs same rules, but in opposite direction.
Iíve been testing this on 4hrs, multiple currency pairs and seems very profitable. The angle of the green keeps you out of ranging trades and the exits maximise the profits
I canít easily forward test this in demo, as my job means Iím out of the house 7am-6pm and Iím not allowed mobile or PC access whilst at work. Hence an EA is the only way Iíll be able to run this (bar time off).
I'm presuming that the code from the indicators can be lifted in some way, and that the tops and bottoms of the candles are easily identifed (I appreciate that seeing them on a screen and the code to generate them maynot be as straight forward)
Hope this hasnít been too much of an intrusion.
Look forward to your response (not including 2, 4 & 5 above !!!) and happy to answer any question or clarification that you may require.
Thanks SP"

I had a few minutes to spare, and so I knocked together the attached. A few points to note:

  1. I have ignored the Synergy stuff and simply measured whether candles are rising or falling.
  2. I have not coded the candlestick trailing stop - couldn't be bothered.
  3. The EA is a marginal loser in backtesting. This is never a good sign, but I might have mis-coded something, or it may be that the candlestick ts is vitally important.
  4. I have not read the thread that inspired the contributor to pm me, and so have coded what I was sent, sort-of.
  5. I do not have any interest in this, and coded it because I was bored, not interested in the strategy.

Have a play guys, and see what you think. The TDI indi is also attached.


TDI Red Green.mq4
Trading Made Simple auto trading robot by Steve Hopwood.mq4


stimpy Apr 30, 2011 7:42pm | Post# 2

will have a play, was looking at the tms thread earlier as tdi is present in the synergy trading method thread on forex-tsd. my main concern was the discretion needed in the tms thread because of the way tdi behaves.

dapo Apr 30, 2011 9:05pm | Post# 3

Hi sir, Please help me to look into the attached code so that it can place order. I don't know where the mistake is.
Thanks.

extern int MA50 = 50;
extern int MA3 = 3;
extern int MA8 = 8;
extern int FastEMA = 12;
extern int SlowEMA = 26;
extern int SignalSMA = 9;
extern double Lots=0.05;
extern int Slippage=3;
extern double TakeProfit=300; // take profit
extern double StopLoss=200; // stop loss
//+------------------------------------------------------------------+
int start()
{
int arraysize=600;
double OsMA[];
double EMAArray[];
double SMAArray[];
ArrayResize(OsMA,arraysize);
ArrayResize(EMAArray,arraysize);
ArrayResize(SMAArray,arraysize);
ArraySetAsSeries(OsMA,true);

for(int i3=arraysize-1;i3>=0;i3--)
OsMA[i3]=iOsMA(NULL,0,12,26,9,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
EMAArray[i3]=iMAOnArray(OsMA,0,1,0,OsMA[i3],i3);
double EMA =EMAArray[i3];

for(i3=arraysize-1;i3>=0;i3--)
OsMA[i3]=iOsMA(NULL,0,12,26,9,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
SMAArray[i3]=iMAOnArray(OsMA,0,8,0,OsMA[i3],i3);
double SMA =SMAArray[i3];
double MA50=iMA(NULL,0, 50 ,0,MODE_SMA,PRICE_CLOSE,0);
double MA3 =iMA(NULL,0, 3 ,0,MODE_LWMA,PRICE_OPEN,0);
double MA8 =iMA(NULL,0, 8 ,0,MODE_SMA,PRICE_OPEN,0);
//----
bool Long=false;
bool Short=false;
bool Sideways=false;
if(MA3>MA8 && MA8>MA50 && EMA>SMA) Long=true;
if(MA3<MA8 && MA8<MA50 && EMA<SMA) Short=true;
if(Long==true && OrdersTotal()==0)
{
OrderSend(Symbol(),OP_BUY ,Lots,Ask,Slippage,Ask/3,Ask*3,0,0,Blue);
}
if(Short==true && OrdersTotal()==0)
{
OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Bid*3,Bid/3,0,0,Red);
}
if(Sideways==true && OrdersTotal()!=0)
{
OrderSelect(0, SELECT_BY_POS, MODE_TRADES);
Comment("Sideways detected");
if(OrderType()==OP_BUY) OrderClose(OrderTicket(),1,Ask,3,Red);
if(OrderType()==OP_SELL) OrderClose(OrderTicket(),1,Bid,3,Red);
}
}
//+------------------------------------------------------------------+

stan3188 May 1, 2011 6:54am | Post# 4

TMS EA
 
Steve

thanks for taking the time to code this, appreciate how busy you are with all your other projects.

Will run on demo to test it out.
Having read the TMS thread I think the TS is the critical piece to making the strategy profitable, but note your lack of interest in developing the EA, so will look for other ways of achieving the stop management.

thanks TS

brijon May 1, 2011 7:29am | Post# 5

good work steve
 
interesting to try with ea alert on in demo

see how ea works as semi auto mode

great work as always

from brian

brijon May 1, 2011 7:46am | Post# 6

might pay for input manual trend
 
as far as i know this strategy used a stolastic 833 for trend but my testing will be done following trend and slight ajustments on stop losses

i think it may have merit on face value

so ill play with it thank you steve

from brian

SteveHopwood May 1, 2011 10:39am | Post# 7

Steve

thanks for taking the time to code this, appreciate how busy you are with all your other projects.

Will run on demo to test it out.
Having read the TMS thread I think the TS is the critical piece to making the strategy profitable, but note your lack of interest in developing the EA, so will look for other ways of achieving the stop management.

thanks TS
I will add the candlestick ts later on - I was feeling lazy yesterday.


SteveHopwood May 1, 2011 1:01pm | Post# 8

Added the cts function.


SteveHopwood May 1, 2011 7:13pm | Post# 9

I realised a few minutes ago that I based the cst on the close, not hi-lo of the previous candle - I am always getting open-close mixed up with hi-lo.

Fix in post 1.


babasemi May 3, 2011 8:43am | Post# 10

Hi
 
Hello Guys,

Is anybody using this EA and how is it going,is it working well?
Can you pls share the inputs/settings.
Mine hasn't taken any trade for about 2 days now.

Cheers.

stan3188 May 3, 2011 3:13pm | Post# 11

EA Isn't Trading
 
Hello Guys,

Is anybody using this EA and how is it going,is it working well?
Can you pls share the inputs/settings.
Mine hasn't taken any trade for about 2 days now.

Cheers.
I'm having the same issue.
I loaded this onto a number of charts yesterday, had them running overnight, but no trades have been taken.
Looking at the charts there should have been at least one trade.
Also noticed that on the screen the Red and Green TDI values are showing as zero. Maybe that's the cause.

Maybe someone with some coding knowledge can spot the problem.

hiredwhip May 3, 2011 3:28pm | Post# 12

1 Attachment(s)
I'm having the same issue.
I loaded this onto a number of charts yesterday, had them running overnight, but no trades have been taken.
Looking at the charts there should have been at least one trade.
Also noticed that on the screen the Red and Green TDI values are showing as zero. Maybe that's the cause.

Maybe someone with some coding knowledge can spot the problem.
Take a look at your setup guys......This a 4-digit crook and the bot is trading like it's on fire....I have TDI indi in the indicators folder

whip
Click to Enlarge

Name: usdcad.gif
Size: 56 KB

stan3188 May 3, 2011 4:05pm | Post# 13

EA Isn't Trading
 
Thanks Whip.

My demo is on a 5 digit crim, so will open another with 4 digits and try again.


Found the problem, I had altered the TDI name slightly. All up and running on a 5 digit crim, so just waiting for the pips to start falling!!!

SteveHopwood May 3, 2011 5:28pm | Post# 14

Take a look at your setup guys......This a 4-digit crook and the bot is trading like it's on fire....I have TDI indi in the indicators folder

whip
This one never even made it onto a demo here. As well as trading as if on fire, is it trading profitably?


hiredwhip May 3, 2011 5:33pm | Post# 15

1 Attachment(s)
This one never even made it onto a demo here. As well as trading as if on fire, is it trading profitably?

Not Quite Yet!!

OOTB with cts

EDIT= After one day I dropped the TP to 30........Sorry
Trading Made Simple DetailedStatement.zip

SteveHopwood May 3, 2011 6:30pm | Post# 16

Not Quite Yet!!

OOTB with cts

EDIT= After one day I dropped the TP to 30........Sorry
Could be worse.


hiredwhip May 3, 2011 6:46pm | Post# 17

Could be worse.

Yes.....105 trades at the moment and I'm $7.50 to the bad.....That cts, IMHO, needs to be monkeyed with....Leave a user input for cts to test with but add ATR generated TS with multiplier and divisor inputs.....

Bubba_1 May 5, 2011 3:33pm | Post# 18

2% in 15 hours
 
Steve,
I think you have created a winner here. I loaded this on several charts about 15 hours ago. It has gained about 2% account balance in that time. I'm still playing with the settings. I think I had the stops too tight at first. It took a lot of trades overnight, small gains and losses.

I've changed the stops to allow more breathing room. Details as they develop.

Thanks,
Bubba

rtrs111 May 8, 2011 11:36am | Post# 19

APB sizes and other important details
 
There was this link posted about how to judge APBs (candle #0,1) before entries: http://www.compassfx.com/video/flash/22108/22108.html

Eelfranz looks to them before placing trades. No small bodies, dojis for example; he also doesn't get in if PA is ranging, consolidating and pays attention for S/R, overall higher tf trend direction. Preferred pairs: EU, AU, GU, EJ, UC, AJ, EG.

He mostly trades H4, going in at 10PM, 2AM PST at the beginning of new 4 hour candles (FXDD), SL under the recent swing HH or LL. Green-red must be crossed (not barely touching) at the beginning of new candle, if not he moves on. Stochastic, EMA are bonuses, for confirmation, but not mandatory (i.e. he doesn't care if candle still under EMA for long). Better chances if cross is under 68 for buys or above 32 for sells. Exits are green going flat, hooks or crosses over red, nothing else (min TP = 50).

Sometimes he re-enters on retracements near red line and then goes back original direction, but hasn't crossed and trend seems still strong.

He trades during the day too, H1, with 10-15 pips SL, re-entering when price comes back. He doesn't recommend lower tfs or other indis (just TDI, EMA shifted, Stochastic and Synergy APB candles http://www.forexfactory.com/showpost...&postcount=156), that's why "trading made simple" - overall around 80 % hit rate with good R/R ratio.

rtrs111 May 8, 2011 2:01pm | Post# 20

H1 re-entries
 
OK, Eelfranz just clarified it, on H1 he doesn't re-enters on the same candle, but later, using retracements/bounce methods. He also doesn't trade Sundays.


© Forex Factory