Closing positions before new day

 

Hi there.

Hopes some good metatrader4 programmer can help me with this ea. I'm trading eurusd on daily timeframe. The rollover cost is high for me when eurusd not is trending meaning staying at the same price for a while.

My idea is to have an ea closing the positions i have for 1 to 10 minutes before new day and when that is done open position some minutes after midnight and aiming to come in at same price i sold at including spread like

a grid system. The purpose is to don't loose any money and not needing to

pay rollover cost.

I know this can be done. The ea would have to calculate the price it sold at,

take care of spread and then putting in the new order at same lots i had before midnight. Nothing complicated, but that's the idea.

If the ea had putted in the new order and there is no trade done, meaning the conditions weren't met that's my decisions and i have to go in the market myself in the morning, but often the price will come back where it were som minutes before midnight.

Anyone could coding this simple and including the code here, please?

Thanks

jorgeng

 

Try to look at SBS EA and at Trade on Friday-Monday EAs as an example.

 

Ok, i look at sbs ea and come back later.

Do you think it is easy to code?

newdigital:
Try to look at SBS EA and at Trade on Friday-Monday EAs as an example.
 
jorgeng:
Ok, i look at sbs ea and come back later. Do you think it is easy to code?

No idea. Igorad coded.

It is the better to look at Trade on Friday-Monday EAs codes as those EAs are more simple and were coded long time ago. But, if I remember, those EAs are closing profitable trades only in the end of the day but you may improve it.

 

Sorry,

i have no permission to see friday-monday page.

newdigital:
No idea. Igorad coded. It is the better to look at Trade on Friday-Monday EAs codes as those EAs are more simple and were coded long time ago. But, if I remember, those EAs are closing profitable trades only in the end of the day but you may improve it.
 
jorgeng:
Sorry,

i have no permission to see friday-monday page.

Sorry, I gave link to elite section.

It is public link https://www.mql5.com/en/forum/172963