Coders needed for 2 simples EA (Tools) - page 2

 
JosTheelen:
Couldn't you solve the problem with only a reader_EA for each account? Those reader_EA's look every tick if a file exists with some special name and read it. Instead of letting a write_EA filling that file, you could do it by hand, with notepad. Or even better, if you restrict the number of your signals, you could do it with a readymade program, that fills that file with standard text.

Yes... you are right... Someone could develop such EA ? i'm not developer.

 
dswk:
Yes... you are right... Someone could develop such EA ? i'm not developer.

OK. I will write that reader_EA for you one of these days.

Just some EA that sells and buys, depending on the existance of a file. Or should it depend on the textin that file? The names of the files (one for buy, one for sell?) are input. The slippage is input. If the trade is done, its will delete that file. Or something different?

 
JosTheelen:
OK. I will write that reader_EA for you one of these days. Just some EA that sells and buys, depending on the existance of a file. Or should it depend on the textin that file? The names of the files (one for buy, one for sell?) are input. The slippage is input. If the trade is done, its will delete that file. Or something different?

Thanks a lot, you preserve my lifetime doing that ;-)

So, should be a good solution to :

Check existance of a file, 1 file for Buy, 1 file for Sell, in a same folder.

If files are not here, do nothing.

If one of the file exist (BUY or SELL), then check file content.

execute, if slippage is correct, the trade. if not, wait and loop from "check file existence" until we could execute the trade (like a pending order...)

When the trade is done, move file in a subfolder \archives

On each files, we should have the following (only 1 line by file):

PAIR/PRICE/TP/SL/TS

eg :

EURUSD/1.3015/1.3050/1.2980/15

Do you think is possible ?

Many thanks.

 
dswk:
Thanks a lot, you preserve my lifetime doing that ;-)

So, should be a good solution to :

Check existance of a file, 1 file for Buy, 1 file for Sell, in a same folder.

If files are not here, do nothing.

If one of the file exist (BUY or SELL), then check file content.

execute, if slippage is correct, the trade. if not, wait and loop from "check file existence" until we could execute the trade (like a pending order...)

When the trade is done, move file in a subfolder \archives

On each files, we should have the following (only 1 line by file):

PAIR/PRICE/TP/SL/TS

eg :

EURUSD/1.3015/1.3050/1.2980/15

Do you think is possible ?

Many thanks.

I can do that. Questions:

What is TS? Number of Lots?

You give a price in the file, but often the "real" price will differ? Should that matter?

Moving a file cannot be done in mq4, that means I have to delete the file and write a copy of it to that subfolder. But in that case I could better write something else (more informative) to the archive-folder. Or should I only delete the file?

 
JosTheelen:
I can do that. Questions:

What is TS? Number of Lots?

You give a price in the file, but often the "real" price will differ? Should that matter?

Moving a file cannot be done in mq4, that means I have to delete the file and write a copy of it to that subfolder. But in that case I could better write something else (more informative) to the archive-folder. Or should I only delete the file?

Nice observations, i forgot the lot number... TS is for TrailingStop.

So,

TextFile is now :

PAIR/PRICE/LOT/TP/SL/TS

eg :

EURUSD/1.3015/3/1.3050/1.2980/15

Perhaps we could change TP and TS by "number of pips" instead of the "price" value as following :

Eg = 1.3050-1.3015 = TP at 35pips and 1.3015-1.2980=SL at 35pips

The existence of the named file in the folder work like a trigger...

If the file is there :

(1) - Try to place order at the price existing in the text file.

(2) - If the market price price in the text file (including slippage) then loop to (1)

(3) - If the market price = price in the text file (including slippage) then place the trade and delete the file.

(4) - wait until the trade is finish to write in an archive-file-folder more informative details.

Do you agree Jos ?

Thanks and Regards.

 

You need a trailing stop? Ok, but that takes more time. I will first make it without TS.

The best is to have SL, TP and TS in pips.

I don't know exactly what I should do with (2). Suppose slippage is 3 and the real price is 2 pips higher than your price? Should I try to buy it with slippage 1 (new slippage based on old slippage-difference)?

The rest is OK.

 
JosTheelen:
You need a trailing stop? Ok, but that takes more time. I will first make it without TS.

The best is to have SL, TP and TS in pips.

I don't know exactly what I should do with (2). Suppose slippage is 3 and the real price is 2 pips higher than your price? Should I try to buy it with slippage 1 (new slippage based on old slippage-difference)?

The rest is OK.

Ok... sorry again, i do not know how to calcule charges in term of functionalities/complexity/days with mq4... still learning...(but i know others computer languages so...)

concerning SL/TP/TS in pips... better in pips as in "price" i think, so great.

concerning slippage, do it as the best you think. i will test impacts.

For the rest, i'm just looking for a first beta version to test it.

Many thanks again. Merci beaucoup. (in my mother language.)

dswk.

 

First version for you. Some remarks:

= use it on a demo!!

= trailing stop not implemented

= archive file is written when trade is opened, not when it is closed

= as delimiter ; is used. So text in the file should be EURUSD;1.3015;3;30;30;20

There are some comments at the start of the EA.

You have to compile it yourself and make a folder "Archive" in the expert/files folder. I assume you know that the "trigger"-files should be placed in the expert/files folder. You should test it and think what you want in the "archive"-file.

Files:
 

Sorry, I should have attached the mq4-file.

Files:
 

Oops i didn't expect it so fast....

Thanks Jos.

I will start tests in demo mode, starting in the next european opening.

Regards, and Enjoy your w.e.

dswk.

Reason: