EA-14084 · Utility

EA_TPSLpanel

This EA provides a visual TP/SL panel on the chart that allows traders to manually set take-profit and stop-loss price levels for an existing open position. When the market price reaches the specified TP or SL level, the EA automatically closes the position by executing a reversing market order. It does not generate its own trading signals or open new positions independently.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskMedium
Rating★★☆☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
Indicators—
AuthorSearchSurf - RmDj (TheHow)

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

The strategy concept of this EA is to serve as an auxiliary management tool for existing positions, allowing users to manually set virtual take-profit and stop-loss levels via a chart panel. Regarding entry conditions, the EA does not initiate entries itself; it relies on the user having an existing open position and only allows TP/SL monitoring activation when an open position is detected. The exit condition is that when the current price reaches the user-specified TP or SL price, the EA executes a reversing market order to close the original position — selling when a buy position hits TP or SL, and buying when a sell position hits TP or SL. For position sizing, the closing trade uses a fixed lot size (LotSize parameter) rather than automatically matching the original position's volume, which can lead to partial close or over-close issues. There is no money management logic whatsoever — no risk percentage calculation, no account balance check, and no maximum loss limit. The TP/SL is not implemented via server-side pending orders but through client-side OnTick polling, which carries the risk of missed executions during disconnections.

Strengths

  • Provides an intuitive chart panel interface where users can set TP/SL prices by clicking on the chart, making operation convenient
  • Supports three modes — TP only, SL only, or both TP and SL — offering good flexibility
  • Includes pre-run validation logic that checks position status and TP/SL validity (e.g., whether TP has already been reached), preventing invalid setups

Weaknesses

  • TP/SL is implemented via client-side OnTick polling instead of server-side pending orders, meaning TP/SL will fail if the connection drops or the EA stops — a significant risk
  • The closing trade uses a fixed LotSize parameter instead of automatically matching the original position's volume, which can result in incorrect closing lot sizes
  • The GetBarPrice function returns bid price when 'close' is requested, which is misleading — the function name and logic don't match
  • ObjectFind return value is used incorrectly — ObjectFind returns 0 when an object is found, but the code uses if(ObjectFind(...)) to check existence, inverting the logic
  • ORDER_FILLING_FOK filling mode may not be supported by all brokers, and there is no compatibility check for the filling mode

Possible improvements

  • Should use server-side stop orders (SL/TP fields or stop-limit orders) instead of client-side polling to ensure TP/SL remains effective during disconnections
  • Should automatically read the original position's volume when closing instead of using a fixed parameter, ensuring complete position closure
  • Should fix the ObjectFind return value check logic and add automatic adaptation for order filling mode compatibility

Risk assessment

Overall risk: Medium

  • Client-side polling for TP/SL means complete TP/SL failure during network disconnection or EA crash
  • Closing lot size doesn't auto-match the original position, potentially leaving residual risk exposure from partial closes
  • No slippage protection, no spread filter, and no retry mechanism — order failures only generate alerts without retry attempts

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management2.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall1.7

Parameters

ParameterDefaultDescription
LotSize0.01Lot size for position closing
PANELcolorclrLightBluePanel background color
TP_PointerClrclrBlueTake profit pointer line color
SL_PointerClrclrRedStop loss pointer line color
StandbyShadowclrBrownShadow color in standby mode
AllowPointertrueShow price pointer on chart

Similar Utility EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.