The Expert Advisor is going to be run on XAUUSD (GOLD) H1 timeframe
Before we can make trades first we must understand the rules:
Stage 1
% change for the most recent H1 candlestick should be calculated from the open of 6 hours before. So if the 08:00-09:00 candlestick XAUUSD closes at 1123.22 it will be calculated from the open of the 03:00-04:00 candlestick which was at 1120.62
To calculate the % change use excel and type in =((100/1120.62)*(1123.22-1120.62)*5
PLEASE NOTE I AM MULTIPLYING ALL THE % CHANGE VALUES BY 5.
Repeat this procedure every time the H1 XAUUSD candle closes. Each time it will shift forward 1 hour.
Stage 2
We now need to make 4 columns.
Open the file [login to view URL] and look at sheet 2
Here you can see I have made the %change numbers*5 in column letter I.
Column J = the previous 2 % change numbers*5 added together.
Column K = the previous 3 % change numbers*5 added together.
Column L = the previous 4 % change numbers*5 added together.
Column M= the previous 5 % change numbers*5 added together
Stage 3
Column N = sum of the row of column J:M/4
for positive values:
When N is between 0 to 0.99 = buy
When N is between 1 to 1.99 = sell
When N is between 2 to 2.99 = buy
When N is between 3 to 3.99 = sell
When N is between 4 to 4.99 = buy
When N is between 5 to 5.99 = sell
When N is between 6 to 6.99 = buy
When N is between 7 to 7.99 = sell
When N is between 8 to 8.99 = buy
When N is between 9 to 9.99 = sell
For negative values:
When N is between -0 to 0.99 = sell
When N is between -1 to - 1.99 = buy
When N is between -2 to - 2.99 = sell
When N is between -3 to - 3.99 = buy
When N is between -4 to - 4.99 = sell
When N is between -5 to - 5.99 = buy
When N is between -6 to - 6.99 = sell
When N is between -7 to - 7.99 = buy
When N is between -8 to - 8.99 = sell
When N is between -9 to - 9.99 = buy
Stage 4
Only 1 trade should be open at any given time
Stop loss input needs to be added
No take profit needed
All trades are closed either at the stop loss or when the value of N and its associated signal change from buy to sell or sell to buy.
i check your given excel file and i can make your EA based on your calculation. and i can complete your EA within 8 hour. waiting for your reply for more discuss,
£30 GBP på 1 dag
5,0 (44 anmeldelser)
5,0
5,0
5 freelancere byder i gennemsnit £21 GBP på dette job