Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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 12-05-2005, 08:35 PM
fubifx fubifx is offline
Junior Member
 
Join Date: Nov 2005
Posts: 4
fubifx is on a distinguished road
custom EA needs help! newbie here.

First, i would want you to know about my programming back ground. I know a little C++ and Pascal, but my skills are like some what beginners stuff or first year stuff. And the language in MQ4 i can read and understand. but writing in MQ4 is hard.

I'm trying to write a EA with this rules:
Looking on daily chart (d1)
Buy/Sell on the beginning of the day (GMT 00)(or other time frame)
if previous day is a up bar (open > close) then buy
if previous day is a dow bar (open < close) then sell
if previous day is a level ( open = close) then look at the previous bar ( 2 days ago) and so on
but if there is a open position (buy or sell) we don't trade that day ( at GMT 00) we wait for the next day and look at if we have a open trade or not.
the SL is 20 and TP is 100 but we should be able to change this. (external)

I'll attach my EA, the problem i have with it is that it's only BUYING!!!!! and i'm kinda sure it's not check for (if open==close) and even if there isn't a open position it doesn't buy/sell.... becoz i think it's stuck on only buying.. and i have EYE BALLED some bars.. and it's reading it wrong.. like it should be selling (a previous down bar) and it could still BUY.!!

can someone please!! correct it .. or give me some idea on how to write it CORRECTLY?? please
Attached Files
File Type: mq4 my_1x5_ea.mq4 (6.5 KB, 20 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-06-2005, 07:23 PM
fubifx fubifx is offline
Junior Member
 
Join Date: Nov 2005
Posts: 4
fubifx is on a distinguished road
OK i think i have fixed the problems =) thz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-07-2005, 07:36 AM
BrunoFX's Avatar
BrunoFX BrunoFX is offline
Senior Member
 
Join Date: Sep 2005
Posts: 810
BrunoFX will become famous soon enough
hello Fubifx,

Could you attach statement this EA please? now that the problems are fixed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-09-2005, 07:37 PM
fubifx fubifx is offline
Junior Member
 
Join Date: Nov 2005
Posts: 4
fubifx is on a distinguished road
haha.. it's a stupid problem.. that have took me 2 days to figure out..
it shouldn't be high low... it should be OPEN and CLOSE .. since everyday have a high and low.. and the high is always higher than the low " " ... so .. it's always buying..

i'll attach my new code... and i think it's working the way i want it.. please take a look and give some ideas =)
Attached Files
File Type: mq4 my_1x5_ea.mq4 (4.8 KB, 29 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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



All times are GMT. The time now is 06:29 AM.