How to code an EA that is triggered by two indicators that doesn't give signals on the same bar ?!

1
I wonder how to make an EA that is triggered by two indicators ( leading / lagging ) .. I mean that their signals does not appear on the same bar ?! For Example : if I am using a stochastic cross as a primary signal and I want the EA not to start the buy or sell order till it gets a confirmation from MA cross ?!! I appreciate your help in this code

Regards,

Hossam Habib


Re: How to code an EA that is triggered by two indicators that doesn't give signals on the same bar ?!

2
enghoss77 wrote: Tue Oct 06, 2020 4:38 am I wonder how to make an EA that is triggered by two indicators ( leading / lagging ) .. I mean that their signals does not appear on the same bar ?! For Example : if I am using a stochastic cross as a primary signal and I want the EA not to start the buy or sell order till it gets a confirmation from MA cross ?!! I appreciate your help in this code

Regards,

Hossam Habib
By using variables or bootlean

If one of them is true set variable/bootlean to 1 and 0 for the opposite .
Then you can tell if one of them is true and wait for the MA cross .

Who is online

Users browsing this forum: No registered users and 20 guests