工作已完成
指定
Build a MT5 EA to trade with Slow Stochastics and Fibonacci Projection level on current timeframe. The EA will execute buy or sell entry trades based on Stochastic golden/death crosses and place take-profit orders based on user-defined Fibonacci Projection level.
Requirements & Logic
1. If Slow Stochastics main and signal crossovers appear, run Fibonacci Method() to determine take-profit level. Do not open new position if there are no Fibonacci or take-profit levels due to insufficient data or golden and death crosses.
a. If main crosses above signal (1st golden cross) AND no existing position AND Fibonacci method() returns value (take-profit), execute buy trade.
b. If main crosses below signal (1st death cross) AND no existing position AND Fibonacci method() returns value (take-profit), execute sell trade.
2. Fibonacci Method() for buy trade take-profit (Refer to attached Buy Trade pic).
a. If latest/current crossover is in sequence of 1st stochastic golden cross, 1st death cross, 2nd golden cross and 2nd death cross.
b. Fibonacci Start Point: Lowest price from 2nd death cross to one candlestick before 1st death cross.
c. Fibonacci End Point: Highest price from 2nd golden cross to one candlestick before 1st golden cross.
3. Fibonacci Method() for sell trade take-profit (Opposite of no. 2, refer to attached Sell Trade pic).
a. If latest/current crossover is in sequence 1st stochastic death cross, 1st golden cross, 2nd death cross and 2nd golden cross.
b. Fibonacci Start Point: Highest price from 2nd golden cross to one candlestick before 1st golden cross.
c. Fibonacci End Point: Lowest price from 2nd death cross to one candlestick before 1st death cross.
4. Place take profit level at user defined Fibonacci Projection Level.
5. Take-profit level updated real-time upon new set of golden and death crosses.
6. Show highest and lowest prices on screen real-time.
Input Variables
1. Slow Stochastic K, D and Slowing (Default: 14, 3, 3).
2. Fibonacci Level (Default: 0.618)
Please feel free to improve efficiency of the code or logic, thank you.