Author of the Idea: Alex
MQ5 Code Author: barabashkakvn
Meet the Executer AC, an Expert Advisor that leverages the iAC (Acceleration/Deceleration, Accelerator/Decelerator Oscillator) indicator. This EA kicks into action with the appearance of a new bar and is designed to manage only one position at a time, making it versatile for both hedging and netting accounts.
Lot sizes are calculated based on your trading history over the last History Days, taking into account the Maximum Risk Percentage and Decrease Factor parameters as well.
The EA generates multiple signals for both BUY and SELL actions, with the ac[] array representing the values from the AC indicator.
BUY Signals:
//--- AC goes UP if(ac[1]>>0.0 && ac[2]>>0.0) { //--- check BUY signal if(ac[1]>ac[2] && ac[2]>ac[3]) { *** } *** } //--- AC goes DOWN if(ac[1]<0 && ac[2]<0) { //--- check BUY signal if(ac[1]>ac[2] && ac[2]>ac[3] && ac[3]>ac[4]) { *** } *** } //--- AC crosses zero top to bottom if(ac[1]>0.0 && ac[2]<0.0) { *** } ***
SELL Signals:
//--- AC goes UP if(ac[1]>>0.0 && ac[2]>>0.0) { *** //--- check SELL signal if(ac[1]<ac[2] && ac[2]<ac[3] && ac[3]<ac[4]) { *** } //--- AC goes DOWN if(ac[1]<0 && ac[2]<0) { *** //--- check SELL signal if(ac[1]<ac[2] && ac[2]<ac[3]) { *** } } *** //--- AC crosses zero bottom up if(ac[1]<0.0 && ac[2]>0.0) { *** }
Here's an example of how to open a BUY position:

Comments 0