Trying to develop a New EA... - page 2

 
ok, will do that next time, I have just been typing straight into the window to try and get across my thoughts ahead of compiling it in the editor....
 

a lot of typo + wrong coding

example "if" and not "IF" (small)

7am ?

nightHigh ?

AND?

else and not ELSE (small)

return and not Return (small "r")

the OnStart must be of void type, with no parameters: so it's supposed to be return; and not return(0); unless you wanna use int start (prior B600) (but i don't see any good reason to use it)

 

Thankyou qjol, thats all good help, I was aware of the extra typing, I was trying to explain a bit about what I was trying to achieve. I wasn't so aware of the upper and lower case usage, so will bear that in mind in future.

7am is when I want the iHighest command to execute, should this be expressed as 07:00GMT and is there a command I need to use with it?

nightHigh - would be a declared variable that I would fill with the result of the iHighest command

AND, sorry wrongly used I was trying to explain that I wanted both the iHighest and iLowest commands to be executed before moving to the else command.

I don't think I've quite understood the difference between void and start, I will try and find some info on it unless its easy to explain, I have no prior knowledge of B600 etc so will use whichever is current.

Apologies to everyone expecting mys posts to be fully completed coding using the SRC button, will endevour to take all this on board.

All help much appreciated

Thanks

tim

 

i forgot to mention: there is no assignment inside an if statement and also comma (",") have no place inside an if statement

bottom line - start reading

 
qjol:

i forgot to mention: there is no assignment inside an if statement and also comma (",") have no place inside an if statement

bottom line - start reading

Which lends the question....

When is metaquotes going to update that pdf?..

They are still teaching people to write Experts with start functions.

Expecting people to read that pdf and produce a workable piece of code is setting them up for failure I'm afraid..

Yes I know there is also the documentation tab.. however some people do actually not live on the internet with a constant connection.

I hope they will spend some time and supply a new pdf or at least take the outdated one off the site.

There is nothing about OOP or the new integer types or the new #properties available in that pdf.

In due time I guess.....Oh wait ... it's already past due....

Come on folks. Can we please get an updated pdf?

It should have been the first thing made available.

No doubt it would have eliminated a lot of confusion...

I for one certainly look forward to being able to download it.... PipPip...Jimdandy

 

1) write to service desk

2) you can do it by yourself

take the "mql4.chm" or any chm file and convert it to a pdf file

there is plenty freeware software or online

you don't need metaquotes for that

 
I don't think I've quite understood the difference between void and start
When you can differentiate it, I bet you will be laughing. Seriously. XD
 

ok, thanks all, embarrassed to say that despite buying 2 FX books I never knew/looked through the online 'book' link on this site, as I said am quite new to all this. Anyway going to take some time out to read it thoroughly before attempting to code my system. Have already read a few thinks that I needed to know and will us in the final code. Just going to have to carry on placing the trades manually for now, up 367pips from 50 trades for the year so far.

Cheers

Tim

 
this can be very useful for you
 

Thanks qjol, I've stored that link, very useful.

Another question someone might be able to help me on is, since I trade on IG I downloaded the Matatrader4 software customized to their platform. When ever I run any downloaded EA's on it through the tester it fails to place orders with an error code of 130 and 131 (related to the ordersend command I believe). When I repeated the same process on the metatrader4 application downloaded from this site, it ran fine. The only difference I could tell is that I may have a zero balance account on IG whereas the software downloaded from this site is a demo, but since I got the same error 130/131 from the same code on the tester functionality, surely it should matter whether its a demo or live account....puzzled I was testing on EUR/USD with 0.1Lot size on 1hr candles....

Reason: