Tâche terminée
Spécifications
Hello, I'd need help to code a simple EA that enters orders based on Strength on 8 currency pairs. The EA monitors the 8 fx pairs strength in the past x hours (input of EA) and enters position on the strongest vs weakest. The EA check of which pairs is strongest and weakest is performed every x minute (input of the EA).
The position should be based on % of Equity Balance and ATR unit of FX pair to be traded
The code of the Strength indicator should be something like below:
v1=security('EURGBP',period)
v2=security('EURJPY',period)
v3=security('EURUSD',period)
v4=security('GBPJPY',period)
v5=security('GBPUSD',period)
v6=security('USDJPY',period)
v7=security('EURCAD',period)
v8=security('EURNZD',period)
v9=security('EURCHF',period)
v10=security('EURAUD',period)
v11=security('GBPCAD',period)
v12=security('GBPNZD',period)
v13=security('GBPAUD',period)
v14=security('GBPCHF',period)
v15=security('USDCAD',period)
v16=security('NZDUSD',period)
v17=security('USDCHF',period)
v18=security('AUDUSD',period)
v19=security('AUDCAD',period)
v20=security('AUDNZD',period)
v21=security('AUDCHF',period)
v22=security('AUDJPY',period)
v23=security('NZDCAD',period)
v24=security('NZDCHF',period)
v25=security('NZDJPY',period)
v26=security('CADCHF',period)
v27=security('CADJPY',period)
v28=security('CHFJPY',period)
EUR=(v1+v2+v3+v7+v8+v9+v10)/7
GBP=((100-v1)+v4+v5+v11+v12+v13+v14)/7
JPY=((100-v2)+(100-v4)+(100-v6)+(100-v22)+(100-v25)+(100-v27)+(100-v28))/7
USD=((100-v3) + (100-v5) + v6 + v15 + (100-v16) + v17 + (100-v18)) /7
AUD=((100-v10)+(100-v12)+v18+v19+v20+v21+v22)/7
NZD=((100-v8) + (100-v13) +v16 +(100-v20) +v23+v24+v25)/7
CAD=((100-v7) + (100-v11) + (100-v15) + (100-v19) + (100-v23) + v26+v27)/7
CHF=((100-v9) + (100-v14) + (100-v17) + (100-v21) + (100-v24) + (100-v26) + v28)/7