Download MetaTrader 5

Code for EA to take only first signal of the day

To add comments, please log in or register
Deposit to your account using bank cards via Gate2Shop
sergiodv
283
sergiodv 2016.09.15 12:07 

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
4704
Marco vd Heijden 2016.09.15 15:27  
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
7083
Muhammad Mudasir 2016.09.16 22:41  
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