Help: How to write simple EA to buy and sell at a specific time? - page 10

 

hi

i hope this is what you needed

loopyno

Files:
misterfx.mq4  2 kb
 
loopyno:
i hope this is what you needed loopyno

Thanks its perfect i will share my strategy after testing!

Regards

MisterFX

 

Time contraints EA.

Hello to everyone,

I would like to create a simple EA that does the following:

- inserts 2 limit orders with SL & TP @ a specific time of the day, taking as the price for the 2 limit orders, the opening price of the candle @ the specified time plus a certain amount of pips (for the short order) and the opening price of the same candle @ the specified time minus a certain amount of pips (for the long order);

- it should let you specify the validity of the 2 orders (for example 14:00 EST);

- if none is executed by that time, both should be cancelled;

- If 1 out of 2 is executed within the time specified, the second should be automatically and immediately cancelled;

If there is anyone willing to help me, I would share a draft of an already developed OCO EA, that could be used as a good starting point.

thank you in advance much for your help

 

I moved your post to this thread with similar EA. Not the same but may be similar (to improved or to modify).

The other EA placing pending orders on certain time of the day was posted on this thead https://www.mql5.com/en/forum/173000

The other similar EA (TimeBreakExpert_v1 and TimeBreakExpert_v1.1 versions) was developed inside elite section.

 

Insert trading time in one expert

Hi someone can help me??

Ineed to insert in one expert the "trading time",for example....... "work from 20 to 6 ,then close all" .. is it possible??'

Thank you

ciao

 
stevetrader:
Hi someone can help me??

Ineed to insert in one expert the "trading time",for example....... "work from 20 to 6 ,then close all" .. is it possible??'

Thank you

ciao

Hello,

I moved the post to this thread. Looks like the one you're looking

 
Linuxser:
Hello, I moved the post to this thread. Looks like the one you're looking

Thank you very much Linuxser

 
stevetrader:
Hi someone can help me??

Ineed to insert in one expert the "trading time",for example....... "work from 20 to 6 ,then close all" .. is it possible??'

Thank you

ciao

Please!!!

 

TP less than 10

Sorry, I intended to reply to another post, but ended up here when I posted... sorry for the interruption... now when I tried to edit my comments, I get that message is too short... so I will try to make them longer now, and say a few nonsensical things like I am doing now to take up suffiencient space to get my misplaced comments out of this thread....

 

Need some help with code

How do I prevent my ea from trading Friday night and Sunday night/Monday morning, my ea only must trade Monday, Tuesday,Wednesday and Thursday nights from 10pm to 3am.

Thank all of you gurus for your help.

Reason: