작업 종료됨
![](https://c.mql5.com/i/avatar/avatar_na2.png)
명시
We need you to create a simple EA based on API data received.
API data is coming in XML format by HTTP url call.
EA needs to read 2 useful data for each currency pair:
<symbol>
<name>EURUSD</name>
<shortPercentage>55</shortPercentage>
<longPercentage>44</longPercentage>
We can read the actual values only and not possible to read historical data. Therefore we have to store at least 1 previous data to compare it with actual.
Trading Logic is simple:
OpenSell if ((actual “shortPercentage” > 50) and (previous “shortPercentage” < 50));
OpenBuy if ((actual “longPercentage” > 50) and (previous “longPercentage” < 50));
Inputs list and defaults:
-----------------------------------
Magic_Number: 19820619
Trading_Lot: 0.1
TakeProfit: 200
StopLoss: 100
BreakEvenTrigger: 15
BreakEvenLock: 5
TralingBeforeBreakEven: false
TrailingStartIfGained: 30
TrailingStop: 20
TimeFrame_and_refresh: H1
CurrencyPairs: EURUSD;GBPUSD;USDJPY;USDCAD;NZDUSD;AUDUSD;CADJPY
Opposite_Trade_Direction: true
Slippage: 10
Comment: “API”
----------------------
I will send you the exact HTTP url call link with code. EA need in 1 file only (with source code in mq4)
If you have any question please contact me.