Specification
-
This EA is a trading assistant to make trade entries convenient and consistent.
-
EA enters trade at bar close (00 seconds) based on time, not ticks.
-
The trader prepares the EA to Buy/Sell by arming it using large square on-chart buttons.
-
BUY (prepares a buy entry at end of candle at 00 seconds)
-
CANCEL (immediately cancels existing arming for this symbol)
-
SELL (prepares a sell entry at end of candle at 00 seconds)
-
Max Slippage
-
Max Slippage (parameter default “0.5” pips)
-
Lot Size
-
Net Risk % (parameter default “1%”)
-
Net Risk % is always based on account balance.
-
EA must calculate the proper Lot size to make sure that the Net Risk % is followed.
-
This includes all trading costs (spread, commission, max slippage)
-
Lot size always includes max slippage value in order to not go above the established Net Risk %
-
Stop Loss
-
BUY SL Price is the Low of the candle that just closed.
-
SELL SL Price is the High of the candle that just closed.
-
Take Profit
-
Target RRR (parameter default “3”)
-
Take SL pip distance and multiple by “3”, this will be TP Price
-
Min Net RRR (parameter default “2”)
-
Because there are trading costs, we will most likely not hit the Target RRR. The Net RRR is our protection to make sure that when we achieve a minimum Net RRR per trade. In some cases, the majority of the Profit generated from hitting the Target RRR goes to trading costs. This is prevalent in scalping strategies where stop losses are tight and big lot sizes have high commission fees. If Min Net RRR is not met at 00 seconds, do not open trade. Wait for the next arming opportunity.
-
Break Even Slide
-
BE Slide Target (parameter default “2”)
-
When a live trade reaches an RRR of “2”, move SL to “Entry Price + Max Slippage”
-
This is used to minimize losses
-
This is the only time that the EA is allowed to modify any price after trade entry.
-
Turn off Break Even Slide functionality if parameter value is 0 or negative.
-
Max Spread
-
Max Spread (parameter default “1.0” pip/s)
-
This is protection where spread widening happens during 00 seconds
-
Use this as a trade filter when the EA attempts to open a trade. If max spread is reached, skip opening the trade. Wait for next arming.
-
Chart Layout
-
EA Status // result of previous arming & current action/s
-
BUY BUTTON
-
CANCEL BUTTON
-
SELL BUTTON
-
These are vertically arranged, found on the upper left of the chart.
-
Button Size (parameter default “50” pixels)
-
In the example: it is 50x50 pixels in size
-
Allow the trader to adjust the size of square buttons. Let the trader choose button colors as well please.
-
Arming for both BUY and SELL at the same time must not happen for the same symbol. Example: If a BUY is currently armed then the trader chooses to click SELL, the EA must replace the BUY arming with a SELL arming.
-
EA Status must be easily understood by the trader. (Pass, Fail, Errors, etc.)
-
Prior to arming: Show live SL, Target RRR, Min Net RRR, via horizontal lines on the chart for the trader’s appreciation in order to make a decision to arm the EA or not.
-
If and when a trade is successfully opened, show at the entry candle using a short horizontal line where the Min Net RRR is. Beside this short horizontal line, include the value of the resulting Min Net RRR.
-
Also show the resulting Net Risk % above the SL Line beside the entry candle
-
EA Compatibility
-
EA must be compatible to any MT5 trading environment (broker, symbol, etc)
// Please provide complete code with line description. Reach out to clarify any trading hurdles I may have missed. Thank you.