I need an ea based on the indicator that i attach. The ea must include the indicator in the code with same imputs and calculations. The indicator calculates the momentum of the 8 major currencies, applies two smoothing emas and gets a final TSI value in a buffer (index 0 to 7). This TSI value gives the signal of oversold or overbought for each currency. The ea is multicurrency only for calculations, but it will trade only in the pair where is installed, and in the same timeframe. So the ea must detect first which is the symbol and TF, and use only the buffers for the 2 currencies of that pair for opening trades. The ea waits until the values of the indicator are in oversold and overbought condition, one currency is oversold and the other is overbought, when the 2 contrary values appear at the same time. Then we have a signal (the ea trade the reversal of price under this conditions). For example in EURUSD when EUR is overbought and USD is oversold we have a SELL signal. After the signal there are 2 conditions for opening a trade: Condition 1: Once we have a signal, the ea must wait for the actual candle to close, if the signal is a SELL and the candle closes bearish, then ea opens a sell trade at the candle close. But if the closing candle is bullish, the ea has to wait until the first bearish candle is formed. Condition 2: When ea finds the correct candle, the values of the indictor should not be greater than in the previous candle. We calculate this by resting the values of the 2 currencies. The difference of values for actual candle should not be greater than at closing of previous candle. Example: in the correct candle we have eur=+55 and usd -55 > difference=110, but in the previous candle at closing we had eur=+50 and usd=-50 diff=100, so in the actual candle the difference is greater than previous candle, trade can not be opened. We have to wait until the correct candle closes and the difference of indicator values is smaller than previous candle. The ea finally opens a trade, but the values are still in the conditions for opening a trade, imagine they are still the same for some candles, the ea will not open more trades in this case. Just one trade per signal. Only if the values of the 2 currencies or one of the currencies change, for example there was a signal in +50 and -50, in some candles one currency maintains +50, but the other goes from -50 to -40 and again to -50, in this case we will have a new signal and the ea will look for the proper candle again. no matter if there are an opened trade just before. Trade will close with 3 options: fixed tp in points, tp in the ema, tp in X value of indicator. Inputs for the ea: >·original imputs of the indicator >·magic number: >·overbought value to open trade: (0 +100) >·oversold value to open trade: (0 -100) >·fixed lot: >·risk lot: 1% -100% >·max simultaneous opened trades: (if 0 no limit) (max trades for this ea, this magic number) >·stoploss in points for single trade: (if 0 no stoploss) >·global/ hard stoploss: in % (ex: if equity -10% close all open trades) >·type of tp: points/ema/value >·tp if points: (if 0 no tp) >·tp if ema: (manual value for ema: 50, 100, 200…) >·tp if value: X : this means if a trade is opened by oversold/overbought value, it will close when one of the 2 currencies, no matter wich one, arrives to this value: if open trade by+50 for one currency and -50 for the other currency, the trade will close when one of them arrives to X. This should take into account that values should be 0 or contrary to the initial one: if X is 25>> open trade was +50 and -50, so close condition is the first currency +50 goes to -25, or the second currency goes from -50 to +25. EURUSD: if signal buy EUR -50 USD +50 tp will be EUR +X or USD -X EURUSD if signal sell EUR +50 USD -50, tp will be EUR -X or USD +X >·max simultaneous trades for the ea (this magic number): 1, 2, 3 etc >·graphic options: show full indicator/ show only the trading pair/ hide indicator