Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2006, 02:54 PM
Junior Member
 
Join Date: Mar 2006
Posts: 3
jargall is on a distinguished road
Lightbulb ADX and EMA Inside Period system

Hi everyone,

I just read the MQL4 guide a couple weekends ago and designed my first EA.

Anyways, here's my first EA: I don't know if it's a profitable system or not, but the results of my EA back-test don't match up with some manual back-testing I did. My manual back-testing shows the system is valid, and I know there are two filters I wasn't able to figure out how to program but I'll get to that after I explain everything. (I attached a text file with the code in it).

Here's the basis of my system:

Initial setup:
15m time period
If it's between 200 and 1400 EST.
If ADX is greater than 20.
If last bar's [1] range is less than the previos bar's [2] range. (Inside Period).
If last bar's [1] range is less than 7 pips.

Conditional setup A:
If 20-period EMA is up.
If Bid is greater than last bar's high [1] (I'm assuming the charts show Bid only... is that right?)
Buy at ask price with stop loss at one tick below last period's low.

Conditional setup B:
If 20-period EMA is down.
If Bid is less than last bar's low [1].
Sell as Bid with stop loss one tick above last bar's high+ask.

I want to set the take profit at a certain Risk:Reward rate. In my back-testing I found that when the Inside period's bar is less that 5, a 3:1 reward ratio is good. (a 30 pip limit order (5(range) + 3(spread) + 2(SL and entry))*3=30).... I don't think I programmed that correctly in my code though.

First question:

Am I using the right code to initiate the trades? Did I correctly use the highs, asks, etc.?

Second question:

My time filter doesn't seem to work. Am I doing this correctly?

Third question:

I only want the trades initiated ONE PIP above last bar's High+ask. I think my current code will initiate trades if prices gap above this price. How do I fix this?

fourth question:

I think this is the biggest error in my code: I don't have a filter for when the 20-EMA reverses but the ADX is still over 20. I would ALSO like to see how this system works if the 20-EMA reverses, the ADX goes down (but not lower than 20) and then goes back up, so MAYBE we could filter out trades when the ADX is down-trending, but then again this might filter out many profitable trades). If I could get some help on the coding, I would be fine experimenting on these different factors.

From my manual back-testing I think I may have a profitable system here, so any help would be appreciated.

Thanks in advance!

Jason
Attached Files
File Type: txt IPADXEMA.txt (4.9 KB, 85 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-14-2006, 03:49 PM
Junior Member
 
Join Date: Mar 2006
Posts: 3
jargall is on a distinguished road
Any answers or input??? Did I explain everything okay? Is it easy to understand the basis of the system?

Basically we're looking for a breakout from a range contraction in an already trending environment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-14-2006, 04:07 PM
firedave's Avatar
Senior Member
 
Join Date: Nov 2005
Location: Jakarta, Indonesia
Posts: 416
firedave is on a distinguished road
Hi jargall, thank you for your post. Just be patience for couple of days, maybe people already gone to easter holiday. All the best for everyone
__________________
David Michael H
"Trader helps traders with sincerity, honesty and integrity"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inside Bar PeaceLover Metatrader 4 25 09-06-2008 10:21 AM
Inside Bar identification toddanderson Indicators - Metatrader 4 2 02-02-2007 01:29 PM
Would someone kindly program the inside highly successful system? toxic_jo Suggestions for Trading Systems 33 12-05-2006 01:48 AM
expire period ? dr_waleed Metatrader 4 4 06-13-2006 07:00 PM


All times are GMT. The time now is 08:32 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.