Lavoro terminato
Specifiche
This EA strategy is simple and will be pretty easy for an experienced developer to code and uses TRAILING PENDING STOP BUY & SELL ORDERS to lock in profit and protect trades so you must know how to code these. If you do a good job and there will be other EA strategies to work on for me.
INPUT BOXS REQUIRED
Standard Inputs
Lot Type
Fix Lot
Equity Risk % for lot
Stop Loss [If 0 disabled)
Take Profit (If 0 disabled)
Magic Number
Strategy Related Inputs (PSO = PENDING STOP ORDER)
[1] # PSO PIPS FROM LIVE TRADE PRICE
[2] # PSO TRAILING PIPS
[3] TRADE COMMENT [ hedging trade number will be added automatically plus some space for me to write brief strategy details for trade analysis)
When the EA is dragged onto whichever chart timeframe is chosen (e.g. 1 Hour, 4 Hour, 1 Day, 1 Week, 1 Month) it will:
1. Open a BUY or SELL trade when the current High of Low of the timeframe is breached.
2.Open a TRAILING BUY STOP ORDER or TRAILING SELL STOP ORDER order in the opposite direction. The EA will use the criteria based on input boxes [1]
3. The TRAILING STOP ORDER OPEN PRICE will will trail the open live trade price by the value entered into input box [2]
4. When the Live trade price starts to move in the opposite direction the TRAILING STOP ORDER will eventually trigger so there will be another live trade open. At this point the EA will open another TRAILING PENDING STOP ORDER in the opposite direction and will close the original trade (opened in 1 above)
IMPORTANT INFORMATION
1. There will only ever be 1 open trade at any one time
2. Any open trade will be protected by a buy or sell stop order in the opposite direction
3. I need this EA to test by midday (GMT) on 6 March 2020
4. I will use this EA on FOREX and Indices (e.g. GBPUSD/EURUSD/JPYGBP S&P500, NASDAQ100, DAX)
5. I require both the source code AND EA files to be provided to me. I’M LEARNING TO CODE AS A BEGINNER SO PLEASE MAKE NOTES WITHIN THE CODE SO I CAN SEE WHICH BIT OF CODE RELATES TO WHICH FUNCTION.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WORKING EXAMPLES
EXAMPLE 1 [PSO = PENDING STOP ORDER]
[1] PSO OPENING TRADE PIPS FROM LIVE TRADE PRICE - 10
[2] PSO TRAILING PIPS - 10
[3] TRADE COMMENT [ADDED AUTOMATICALLY BASED ON TIMEFRAME, AND VALUES ABOVE
I drag this EA onto the GBPUSD H4 chart. The LOW of the timeframe is 1.38583 and the HIGH of the H4 timeframe is 1.39748
The price rises to 1.39749 so the EA opens a BUY trade at 1.39749 and a PENDING SELL STOP ORDER at 1.39649 (THIS IS BECAUSE THE VALUE OF INPUT BOX 1 IS 10 MEANING THAT THE PENDING SELL STOP ORDER IS PLACED 10 PIPS BELOW THE OPEN BUY TRADE PRICE)
The open BUY TRADE price moves up 10 pips so the PENDING SELL STOP ORDER open price moves to 1.39749 (THIS IS BECAUSE THE VALUE OF INPUT BOX [2] is 10 MEANING THAT THE PENDING SELL STOP ORDER OPEN PRICE TRAILS THE OPEN BUY TRADE BY 10 PIPS) The price moves up another 10 pips so the PENDING STOP ORDER open price moves to 1.39849
The open BUY TRADE price starts to fall and hits 1.39849 so the PENDING SELL STOP ORDER is triggered and the EA opens a SELL TRADE at 1.39849. It also opens a PENDING BUY STOP ORDER at 1.39859 and closes the open BUY trade.
This process just repeats and repeats until I remove the EA from the chart
EXAMPLE 2 [PSO = PENDING STOP ORDER]
[1] PSO OPENING TRADE PIPS FROM LIVE TRADE PRICE - 10
[2] PSO TRAILING PIPS - 10
[3] TRADE COMMENT [ADDED AUTOMATICALLY BASED ON TIMEFRAME, AND VALUES ABOVE
I drag this EA onto the GBPUSD H4 chart. The LOW of the timeframe is 1.38583 and the HIGH of the H4 timeframe is 1.39748
The price rises to 1.39749 so the EA opens a BUY trade at 1.39749 and a PENDING SELL STOP ORDER at 1.39649 (THIS IS BECAUSE THE VALUE OF INPUT BOX 1 IS 10 MEANING THAT THE PENDING SELL STOP ORDER IS PLACED 10 PIPS BELOW THE OPEN BUY TRADE PRICE)
The open BUY TRADE price immediately starts to fall and hits 1.39649 so the PENDING SELL STOP ORDER is triggered and the EA opens a SELL TRADE at 1.39649. It also opens a PENDING BUY STOP ORDER at 1.39749 and closes the open BUY trade.
This process just repeats and repeats until I remove the EA from the chart