İş Gereklilikleri
I need a very simple EA which:
Works on the latest levels of top/ bottoms. Support and resistance are the latest bottom and tops on the chart and they keep changing upon the formation of new top/ bottoms. Whenever a new top/ bottom forms, these resistance/ support levels change accordingly. Support and resistance horizontal lines should be drawn by the EA in the red colour. EA should draw the horizontal lines on the latest resistance and support levels considering the high and low of the respective candles and remove the previous ones. These levels are used as reference points for entry/ exit of the trades.
There should be three options for Trade type named as ‘Price touch’ & ‘Candle close’ & ‘Both functions’. Of course, that way EA is asking as to whether trigger the trade as if the price crosses x number of pips above/ below the latest Res/ Sup level by touching (x to be determined by the trader) or wait for the candle close to avoid whipsaws. In case, ‘both functions’ is selected by the trader, the EA should work in both ways, that means placing two trades, each separately for ‘Price touch’ and ‘Candle close’ with its own stop loss and take profit behaviours determined below.
Buy:
1- Buy when the price candle touches x number of pips above the latest Resistance (If Price touch selected) or closes above it on the current timeframe (If candle close selected) or do both (If ‘both functions’ selected)
Or
2- Buy when an already selling trade has been triggered due to price cutting a recent support below but moves back up from the support before a new top is formed. This ensures that bearish trap is avoided. This should close the sell trade and trigger a buy trade. Please note that this type of trade will only be triggered at the candle close even if the trader has selected ‘Price touch’ option here.
Or
3- Buy when price moved below the recent support but fails to close below it. This will obviously also be triggered at the close of candle only.
Buy close:
1- Close buy when the price crosses x number of pips below the latest support (If Price touch) or closes below it (If Candle close selected). If trader has selected ‘Both functions’ then each of two trade should be closed accordingly according to its trade type (Price touch/ Candle close). For ease of identification, EA can put remarks in front of each trade as ‘Price touch’ or ‘Candle close’ accordingly.
2- Close buy if price crosses x number of pips above the recent top but fails to close above it. Even if price touch option has triggered a buy trade, it should be closed if it fails to close above it.
Stop loss:
The field ‘Stop loss’ should be of two types:
ii- Fixed
ii- Top bottom
The fixed stop loss is just fixed number of pips away from the opening price of the trade as mentioned by the trader.
Top bottom’ stop loss is the stop loss ‘x’ number of pips above or below the latest top/ bottom. The number of pips ‘x’ will be mentioned by the trader. For example, If the trader inputs ‘5’ for a buy stop, the stop loss of this trade will be 5 pips below the last bottom. S/L type ‘Fixed’ and stop loss distance=0 would mean no stop loss for the trades.
Take Profit:
The ‘Take profit’ should be of three types
ii- Fixed
ii- Top bottom
ii- Trailing
The fixed take profit is just fixed number of pips away from the opening price of the trade as mentioned by the trader.
‘Top bottom’ take profit is ‘x’ number of pips above or below the latest top/ bottom. The number of pips ‘x’ will be mentioned by the trader. For example, If the trader inputs ‘5’ for a buy stop, the take profit of this trade will be 5 pips above the last top. If the trader inputs ‘-5’ for a buy stop, the take profit of this trade will be 5 pips below the last top. Hence, the take profit of buy orders will be x pips above/ below the latest top and the take profit of sell orders will be x pips below/ above the latest bottom. Please note that unlike stop loss, top bottom take profit can have a negative value as it will imply the price hit x pips before the latest top/ bottom.
iii- ‘Trailing’ take profit is simply trailing and should work like a common trailing take profit with number of pips inputted by the trader in EA settings.
Sell:
1- When the price candle touches x number of pips below the latest Support (If Price touch selected) or closes below it(If candle close selected) or do both (if ‘both functions’ selected)
Or
2- Sell when an already buying trade has been triggered due to price cutting a recent resistance above but moves back below the resistance before a new top is formed. This ensures that bullish trap is avoided.
Or
3- Sell when price moved above the recent resistance but fails to close above it.
Sell close:
1- Close sell when the price crosses x number of pips above the latest resistance (If Price touch) or closes above it (If Candle close selected)
2- Close sell if price crosses x number of pips below the recent bottom but fails to close below it. Even if price touch option has triggered a sell trade, it should be closed if it fails to close below it.
Lot size calculation:
There should be two field named as:
1- Capital risk amount/ trade
2- Capital percentage/ trade
These values allow the trader to determine value of capital to be risked per trade.
Only one field could be considered correct and should be inputted by the trader, the other value should be selected as N/A by the trader.
Lot Size:
10- There should be a field named as ‘Lot Type’ with the option to choose as ‘fixed’ and ‘Variable’. If the traders selects ‘Fixed’, the next field named as ‘Fixed Lot Size’ should take input of standard lot size from the trader and place each trade of that lot size. In case the Lot type is selected as ‘Variable’, then EA should refer to the fields named as ‘Capital risk amount per trade’ or ‘Capital risk percentage per trade’ the EA where the trader will write an amount or percentage of capital to be risked in a single trade and hence the EA should calculate the lot size accordingly. For example, opening price of a long trade in US30Cash is 33930 after the formation of bottom at 33900. This is difference of 33930 – 33900 = 30 pips. Suppose, the trader has written an amount of 100$ in the ‘Capital risk amount per trade’ field. Hence the lot size should be calculated as 100/30 = 3.33$/ pip. If the trader selects ‘N/A’ in this field, the EA should look on the next field ‘Capital risk Percentage per trade’ which is being explained here now.
11- Another field named as ‘Capital risk Percentage per trade’, as depicted from the name is simply the percentage of the capital which should be risked per trade. For example, If the trader writes 1 here and my current capital is 10,000$, the maximum loss should automatically be considered 1% x 10,000 = 100$ and the lot size should be calculated accordingly. The max value of this field should be 10. If the trader selects ‘N/A’ then the above field ‘Capital risk amount per trade’ should be considered in this case.
14- The last two fields named as ‘Profit stopper’ and ‘Loss stopper’ are used to protect the profits/ avoids the losses of running trades and work simple. I.e; if the trader mentions 200 in the ‘Profit Stopper’ the EA should close all running trades (instead of whether they are in profit or loss) when the total of running profit reaches 200 dollars (or the account currency). Similarly, if the trader inputs -200 in ‘Loss Stopper’, EA should close all running trades if the total loss of all running trades becomes -200 or lower. When these fields are zero, it shouldn’t work.