Download MetaTrader 5

Code for EA to take only first signal of the day

To add comments, please log in or register
sergiodv
288
sergiodv  

Firstly I am not a skilled coder. I am trying to teach myself

I am writing an EA where I am using a custom indicator where I only want to take the first signal of the day on a 1-hr chart.

There might be 3-4 signals during a day but I need the system to ignore all subsequent signals.

If someone can help me out, I would be very appreciative

Thanks in advance 

Marco vd Heijden
Moderator
5117
Marco vd Heijden  
sergiodv:

Firstly I am not a skilled coder. I am trying to teach myself

I am writing an EA where I am using a custom indicator where I only want to take the first signal of the day on a 1-hr chart.

There might be 3-4 signals during a day but I need the system to ignore all subsequent signals.

If someone can help me out, I would be very appreciative

Thanks in advance 

Well you can set a flag once the first order is filled.

A piece of the current code can help.

Muhammad Mudasir
10759
Muhammad Mudasir  
make global variable and flag it after once signal done and flag reset when date change
if u want proper code then let me know
To add comments, please log in or register