• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:21pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:21pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Broker Challenge "NDD/STP" vs. True "ECN" and "Mkt Mkr" broker talk 46 replies

Dealing with "Invalid Price", "Requote", "Server Busy" in MT4 3 replies

Please suggest a simple & effective Method/System of "Trading System" Forum to newbie 176 replies

Need a simple trade managing EA based on candle "color" 9 replies

A simple trading system - based on creativity 6 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 874
Attachments: A "new" simple system based on MA
Exit Attachments

A "new" simple system based on MA

  • Last Post
  •  
  • 1 1112Page 131415 87
  • 1 12Page 1314 87
  •  
  • Post #241
  • Quote
  • May 5, 2011 4:52pm May 5, 2011 4:52pm
  •  dragonspeak
  • | Joined Apr 2011 | Status: Dragon | 149 Posts
Hi hmaoui. In order to create a ea I want to ask you if you could write the exact rules, for example the min distance between DI+ DI- etc. This is for the robot not make to many false signals.

I can not send pm but if you want to answer me with pm is ok.
Thank you,
Dragon.
 
 
  • Post #242
  • Quote
  • May 8, 2011 5:33pm May 8, 2011 5:33pm
  •  magft
  • | Joined Apr 2011 | Status: Member | 208 Posts
I've been away all last week so not had much time to look at the system.

I've made a few changes to the previous one so now it checks for PA to cross above/below all MAs and then waits for pullback before entering. Well that was the plan so i added MinMAOffset to allow user option to decide how close PA to 15EMA, but in backtesting it fails miserably if set lower than 1 (which basically disables it).

So once the position of PA is determined relative to EMAs and a pullback occurs a check is made to ensure Stoch is above/below 50 and DMI is correct (green above red or red above green).

There are now several filters to try and keep out of bad trades. RSI(20) Daily to try and stay out of ranging markets. DMI spread which is the min distance between DMI+/-.

I've changed the criteria for exit as well. For Buy:

DMIPlus<DMINeg
PA<EMA15
EMA15>EMA15_Prev
EMA30>EMA15
Stoch>50
PA> all MAs

and the reverse for sell.

I mainly use the jumping stop to grab pips and in backtesting EU M1 it looks good with the default settings (from beginning of year it achieves 250% increase in balance).

Like i said not had much time to look at it due to family commitments so posting to see what can be done to improve system. I'm no expert in coding or forex so could do with help improving the EA. Once again thanks go to Steve Hopwood for the EA framework.
Attached Files
File Type: mq4 Hmaoui auto trading robot MAs by magft.mq4   57 KB | 279 downloads
File Type: tpl hmaoui auto trading robot mas by magft.tpl   2 KB | 369 downloads
 
 
  • Post #243
  • Quote
  • May 9, 2011 4:29am May 9, 2011 4:29am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
Yes ! Always have a look at your higher TF

Quoting Bom-Bom
Disliked
Wow..great news! can't wait to see the EA



So..when we see the pullback on 5M, we'll change to M1 to find opportunity to enter?

Best Regards,
Bom-Bom
Ignored
 
 
  • Post #244
  • Quote
  • May 9, 2011 4:34am May 9, 2011 4:34am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
Wow ! Really amazing ! I didnt see it. I think you use FXPro which I have downloaded in demo mode.... It's not a problem at all, seem to be very low difference. Anyway I am and we are not responsible for it.

Quoting marco.fx
Disliked
Hi, I'm following this thread with great interest since I'm still learning about forex so thanks to all
I'm testing the strategy on a metatrader4 platform and I'm having a lot of false signal. Looking closely at the charts posted by hmaoui I noticed some differences in the data.

In metatrader there is the ADX indicator (Average Directional Movement Index) and not the DMI (Directional Movement Indicator), I thought the +DI and -DI were the same but they seems to be different.

Look at the charts attached, the first is from hmaoui and the second...
Ignored
 
 
  • Post #245
  • Quote
  • May 9, 2011 4:39am May 9, 2011 4:39am
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
hmaoui and magft,

Please see the attached chart and correct me if I'm wrong.

in order to find a very perfect setup, the key is ADX.

If I may provide the pseudocode for the EA, that would be something like this :
1. For buy trend, the ADX first must show Buy Trend (ADX+ > ADX-), and the EMA must be in this order : EMA12 ON top, EMA30 below EMA12, EMA60 below 12 and 30.

2. Once the price get into the trap (go back to EMA12 minimum), check the ADX. Did he ever, even for once he crossed--although he is showing buy trend now--, after he crossed Buy, he ever crossed back to sell, and then on the Buy State again? IF the answer is YES... Return(0) for the EA (the signal is no valid).

3. But if the answer for number 2 above is NO (means that since the first time ADX Crossed Buy, He keeps that condition until the price get into the trap), then continue to number 4.

4. Check for stochastic, does he is below 50 level now? If not, return(0) --> do nothing. if Yes, go to number 5

5. THEN WE HAVE BUY ORDER. STOP LOSS Will be previous swing low.


Vice Versa will be for Sell.
From my point of view, in this system, the trend is not just determined by the EMA, but the ADX also. As long as this ADX never crossed back since the first time it crossed, that would be a very perfect setup!!!

check the picture below for clear explanation of my view.

Thanks.

Best Regards,
bom-bom
Attached Image (click to enlarge)
Click to Enlarge

Name: great.gif
Size: 42 KB
 
 
  • Post #246
  • Quote
  • May 9, 2011 4:45am May 9, 2011 4:45am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
....this question because I never studied it ! It is about my feeling. But what I can say you is that when there is a strong trend DMI are well spreaded. I will try to define a number but I think the best is to test different parameters....

Quoting dragonspeak
Disliked
Hi hmaoui. In order to create a ea I want to ask you if you could write the exact rules, for example the min distance between DI+ DI- etc. This is for the robot not make to many false signals.

I can not send pm but if you want to answer me with pm is ok.
Thank you,
Dragon.
Ignored
 
 
  • Post #247
  • Quote
  • May 9, 2011 4:47am May 9, 2011 4:47am
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
And this one is the example for NOT A PERFECT SETUP TO ME.


PATIENT...PATIENT..AND PATIENT.... is the key to win using this strategy
Afterall, this is 1 minute chart, how long can it be?
Be patient to wait for a good setup my friends....
Attached Image (click to enlarge)
Click to Enlarge

Name: great2.gif
Size: 48 KB
 
 
  • Post #248
  • Quote
  • May 9, 2011 4:49am May 9, 2011 4:49am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
As a filter, you have to use only during London an NY sessions!

Quoting magft
Disliked
I've been away all last week so not had much time to look at the system.

I've made a few changes to the previous one so now it checks for PA to cross above/below all MAs and then waits for pullback before entering. Well that was the plan so i added MinMAOffset to allow user option to decide how close PA to 15EMA, but in backtesting it fails miserably if set lower than 1 (which basically disables it).

So once the position of PA is determined relative to EMAs and a pullback occurs a check is made to ensure Stoch is above/below 50 and DMI is correct...
Ignored
 
 
  • Post #249
  • Quote
  • May 9, 2011 4:52am May 9, 2011 4:52am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
I think it could be a good definition of what the perfect setup is.

Quoting Bom-Bom
Disliked
hmaoui and magft,

Please see the attached chart and correct me if I'm wrong.

in order to find a very perfect setup, the key is ADX.

If I may provide the pseudocode for the EA, that would be something like this :
1. For buy trend, the ADX first must show Buy Trend (ADX+ > ADX-), and the EMA must be in this order : EMA12 ON top, EMA30 below EMA12, EMA60 below 12 and 30.

2. Once the price get into the trap (go back to EMA12 minimum), check the ADX. Did he ever, even for once he crossed--although he is showing buy trend now--, after he crossed...
Ignored
 
 
  • Post #250
  • Quote
  • May 9, 2011 4:55am May 9, 2011 4:55am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
On the secod setup, you can take the trade but it is not a perfect setup and when there is a cross it can signal an exhaustion of the precedent trend. Means consolidation (very dangerous to trade the market with this system in ranging period) or reverse. Anyway, if you took the perfect setup, you did your job for the day :-)

Quoting Bom-Bom
Disliked
And this one is the example for NOT A PERFECT SETUP TO ME.


PATIENT...PATIENT..AND PATIENT.... is the key to win using this strategy
Afterall, this is 1 minute chart, how long can it be?
Be patient to wait for a good setup my friends....
Ignored
 
 
  • Post #251
  • Quote
  • May 9, 2011 4:58am May 9, 2011 4:58am
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
Quoting hmaoui
Disliked
Anyway, if you took the perfect setup, you did your job for the day :-)
Ignored
Hahahaha... I did Hmaoui ! The ADX seems pretty good to filter ranging market !

Thanks for teach us the system
 
 
  • Post #252
  • Quote
  • May 9, 2011 8:52am May 9, 2011 8:52am
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
Perfect Setup after US Open on 12 GMT.

Find good movement on every open market.

Conditions for perfect setups on the picture :
1. EMA on its order
2. Price pullback to EMA 12 (minimum)
3. ADX Never crossed back since the trend begin (always red above green) --> Very Good filter! Once ever cross back will cancel the setup.
4. Stochastic above 50 for Sell
Attached Image (click to enlarge)
Click to Enlarge

Name: great3.gif
Size: 32 KB
 
 
  • Post #253
  • Quote
  • May 9, 2011 9:28am May 9, 2011 9:28am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
I have different data between my real account (Whs) and my demo account (FXPro)...Difference is not in the price but on the indicators, especially on the DMI. I dont know how it is possible as it is the same formula and the same parameters. Price could be different but not enough to give us so different results ! I dont have any explanation though it warns me...
 
 
  • Post #254
  • Quote
  • May 9, 2011 9:46am May 9, 2011 9:46am
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
Quoting hmaoui
Disliked
I have different data between my real account (Whs) and my demo account (FXPro)...Difference is not in the price but on the indicators, especially on the DMI. I dont know how it is possible as it is the same formula and the same parameters. Price could be different but not enough to give us so different results ! I dont have any explanation though it warns me...
Ignored
Hi hmaoui,

Me myself never use live chart as analysis. Why? Because broker usually manipulated live prices.
I used to analyze on demo chart, because on demo chart, the price feed is not manipulated. They are viewed exactly as the price provider feed (could be from Reuters or Bloomberg).

Just use demo chart to analyze and trade on live account. that would be wise.

Best Regards,
Bom-Bom
 
 
  • Post #255
  • Quote
  • May 9, 2011 9:47am May 9, 2011 9:47am
  •  marco.fx
  • | Joined May 2011 | Status: Junior Member | 2 Posts
This is what I was talking about !
The DMI is sometimes crossing when yours is spreading.
If you look at the stoch also you will notice some differences because mt use full stoch but you are using slow stoch wich is less reactive since it is a ema3 of the full stoch. AFAIK the slow stoch = %D (signal line) of the full stoch

PS: I'm using a demo account on fxpro

Quoting hmaoui
Disliked
I have different data between my real account (Whs) and my demo account (FXPro)...Difference is not in the price but on the indicators, especially on the DMI. I dont know how it is possible as it is the same formula and the same parameters. Price could be different but not enough to give us so different results ! I dont have any explanation though it warns me...
Ignored
 
 
  • Post #256
  • Quote
  • May 9, 2011 12:28pm May 9, 2011 12:28pm
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
I think it is possible to profit from this situation during news release !!! On NFP, I can check the price on my demo account on FXPro and place my trades on my real account in Whs.....Could be very very profitable and 100% safe. It should be the real holy grail lol :-)


Quoting marco.fx
Disliked
This is what I was talking about !
The DMI is sometimes crossing when yours is spreading.
If you look at the stoch also you will notice some differences because mt use full stoch but you are using slow stoch wich is less reactive since it is a ema3 of the full stoch. AFAIK the slow stoch = %D (signal line) of the full stoch

PS: I'm using a demo account on fxpro
Ignored
 
 
  • Post #257
  • Quote
  • May 9, 2011 5:55pm May 9, 2011 5:55pm
  •  Bom-Bom
  • | Joined Sep 2006 | Status: Member | 152 Posts
Quoting hmaoui
Disliked
I think it is possible to profit from this situation during news release !!! On NFP, I can check the price on my demo account on FXPro and place my trades on my real account in Whs.....Could be very very profitable and 100% safe. It should be the real holy grail lol :-)
Ignored
The problem is..... does the beroker receive order during the news release? As I know, brokers start to accept orders just a few seconds after news release of which, the price already make a jump and already stable
 
 
  • Post #258
  • Quote
  • May 10, 2011 2:42am May 10, 2011 2:42am
  •  magft
  • | Joined Apr 2011 | Status: Member | 208 Posts
Quoting magft
Disliked
I've made some changes to the EA and added the rules as per above for trade signals. I restructured the code so there is now "BuyTrigger" and "SellTrigger" routines that contain the rules for trade.

Not had time to backtest yet so really could use some help with testing this, but should be ready to add to a M1 chart. I have used EMA15 as per hmaoui recommendation for M1 chart, all MAs customisable.

Let me know your thoughts, ideas, etc. The last one had a bug in the logic which is fixed in this one.
Ignored
I must have been tired last night, just been watching a couple of trades and there were Longs when price was below all EMAs. Also i had messed up the stoploss calculation as it was meant to check want criminals min stop was and use that but i got the code wrong which caused alerts to keep popping up.

I need to have a rethink about the DMI cross part, it doesnt seem to work as it should. I think using a global variable to signal a cross has occurred and maybe the time for reference when we check all other conditions. Wont be able to check this till tonight though.
Attached File
File Type: mq4 Hmaoui auto trading robot MAs by magft.mq4   60 KB | 193 downloads
 
 
  • Post #259
  • Quote
  • May 10, 2011 10:04am May 10, 2011 10:04am
  •  magft
  • | Joined Apr 2011 | Status: Member | 208 Posts
The EA is running and making a small profit. In the attached screenshot i would have thought entry at the white circle and exit at the yellow would be a good trade. The EA didn't take it and i am trying to figure out why.

Logic around the EMA cross and DMI cross needs improving for this to work properly. I have it running on 6 pairs and it has made 3.15% since this morning with max floating DD of 3.3%. So not too bad, i am using 0.01 lots.

Current version attached.
Attached Image (click to enlarge)
Click to Enlarge

Name: eu m1 1300 100511.JPG
Size: 151 KB
Attached File
File Type: mq4 Hmaoui auto trading robot MAs by magft.mq4   61 KB | 318 downloads
 
 
  • Post #260
  • Quote
  • May 11, 2011 4:20am May 11, 2011 4:20am
  •  hmaoui
  • | Commercial Member | Joined May 2007 | 612 Posts
I thank you for your consideration and your help...

Quoting magft
Disliked
The EA is running and making a small profit. In the attached screenshot i would have thought entry at the white circle and exit at the yellow would be a good trade. The EA didn't take it and i am trying to figure out why.

Logic around the EMA cross and DMI cross needs improving for this to work properly. I have it running on 6 pairs and it has made 3.15% since this morning with max floating DD of 3.3%. So not too bad, i am using 0.01 lots.

Current version attached.
Ignored
 
 
  • Commercial Content
  • /
  • A "new" simple system based on MA
  • Reply to Thread
    • 1 1112Page 131415 87
    • 1 12Page 1314 87
1 trader viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022