Lavoro terminato
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specifiche
Please read description carefully and make sure you understand what I want.
You need to create a simple EA that will do the fallowing
The Ea will open trades in a specific order, opposite previous trade.
Trade 1(T1) will be triggered by the Stochastics values that I need to be able to adjust and the lot size of every trade
If stochastics value is under 20 trigger BUY if it is over 80 trigger SELL ….. 1 lot for example :
When Trade 1 is triggered, the EA will generate 5 Price Values ( A,B,C,D,E)
Trade 2 and following trades will open based on B,C,D,E that I must be able to adjust
IF Trade 1 is a BUY ( stochastics value is under 20 )
Price A = buy value
Price B = A+10 pips
Price C = A-10 pips
Price D = A-50 pips
Price E = A+5pips
T1 will set TP and SL with one of the values B,C,D,E
If Trade 1 will hit Price E the trade will be closed on TP
If T1 will hit price C trade 2 will be triggered
If T2 is triggered T1 will automatically adjust TP at price B, so for T1, I need to have 2 TP boxes to be adjusted lets called T1tp1 and T1tp2
If trade 1 is SELL values of B,C,D,E will be opposite
Price A = sell value (reference price)
Price B = A-10 s
Price C = A+10
Price D = A+50
Price E = A-5
I must be able to adjust B,C,D,E values in pips before any trade is triggered
Trade 2 will be opposite Trade 1 so if T1 is BUY, T2 will be SELL
If T1 is SELL, T2 will be BUY
T2 must have adjustable lot size
T2 = triggered by select one of the values A B C D E
T2 will have TP/TP = one of values B,C,D,E
T3 will be opposite T2 will be triggered by one of the values A,B,C,D,E
T3 must have adjustable lot size
T3 will have TP/SL one of the values B,C,D,E
T4 will be opposite T3 will be triggered by one of the values A,B,C,D,E
T4 must have adjustable lot size
T4 will have TP/SL one of the values B,C,D,E
And so on until 21 trades
Other notes to consider if Trade 1 is active Stochastics indicator will not generate new trades
If one trade is CLOSED due to TP or SL all trades will be closed immediately
The EA WILL calculate automatically value of 1 lot = a percentage of the account equity
Template
Buy Value | Sell Value |
Stochastics trigger values for T1
Triger value by indicator | TP value E | SL value D | Lot size |
T1
IF T1 = Buy
A = Buy price
B = A +
Pips number |
B = A –
Pips number |
C = A -
Pips number |
D = A-
Pips number |
E = A+
IF T1 = SELL
A = Sell price
Pips number |
B = A -
Pips number |
B = A +
Pips number |
C = A +
Pips number |
D = A+
Pips number |
E = A-
Trigger value A,B,C,D,E | TP value B,C,D,E | SL value A,B,C,D,E | Lot size |
T2
Oposite T1
Trigger value A,B,C,D,E | TP value B,C,D,E | SL value A,B,C,D,E | Lot size |
T3
Oposite T2
Triger value A,B,C,D,E | TP value B,C,D,E | SL value A,B,C,D,E | Lot size |
T4
Oposite T3
And so on until 21 trades
the final bot must look something like this but with one extra box for T1tp1 and one where I can set the value of 1 lot as equal with a percentage of account equity :
I must be able to adjust stochastics values that will trigger t1
TP1/TP2 and SL for t1 and lot size
I must be able to adjust values in pips of B,C,D,E for buy and sell
I must be able to adjust select values of B,C,D,E for future trades and the lot size
I must be able to adjust 1lot as equal of a percentage of the account equity
For any other clarifications you can contact me
Thanks