Skip to Content
IPDAHard Targets

Hard Targets

With the live reversal trigger, SL/TP are always fixed distances (pips × PIP_SIZE) sent to mt5-trader as stop_loss_distance / take_profit_distance. RSI produces no price level, so there is no indicator-derived stop to fall back on.

ProfileSTOP_LOSS_PIPSTAKE_PROFIT_PIPS
Forex4050
Deriv5080

USE_HARD_TARGETS must stay true. The service refuses to start with USE_HARD_TARGETS=false (startup validation). RISK_REWARD is inert.

Absolute Supertrend-line stops only apply if you switch the unused Supertrend strategy back on in code. The shipped service never does that.

Why distances matter

This service evaluates on a bar close, and MT5 bars are bid-based, while a market buy fills at the ask. Anchoring absolute levels here would add the spread to every long’s risk and subtract it from the reward.

Sending distances lets mt5-trader measure from the price the order actually fills at, which also removes the error from price drift during POLL_INTERVAL_SECONDS.

PIP_SIZE must be set explicitly

Every pip-denominated setting (STOP_LOSS_PIPS, TAKE_PROFIT_PIPS, MFE_BREAK_EVEN_PIPS) is multiplied by PIP_SIZE. It is deliberately not derived from PRICE_DIGITS.

Always set PIP_SIZE explicitly. Leaving it unset falls back to the legacy 10^-(PRICE_DIGITS-1) derivation for backward compatibility only. A wrong PIP_SIZE silently produces stops that are an order of magnitude off.

InstrumentPIP_SIZEPRICE_DIGITS
EURUSD0.00015
XAUUSD0.102
BTCUSD1.02
Volatility 75 Index0.012

On the forex profile, BTCUSD uses the same 40/50 pip distances as XAUUSD. Matching gold’s $40 dollar risk would require 1.00 BTC lot (full-coin notional), which a 10K account typically cannot margin. Shipped volume is 0.05 ($2 risk) so orders fit alongside XAUUSD; raise only when free margin allows. Volumes above mt5-trader MAXIMUM_VOLUME are rejected with volume_cap_exceeded (HTTP 422).

The Deriv profile deliberately keeps a wider 50/80 stop and target. At PIP_SIZE=0.01, a 40-pip stop is a 0.40 price distance on Volatility 75 — well inside that symbol’s trade_stops_level — and mt5-trader rejects it with stop_loss_too_close.

To re-calibrate for another instrument or platform:

PIP_SIZE = price_move / reported_pips

PRICE_DIGITS describes the feed you execute on — read it from mt5-trader’s GET /v1/market-data/tick rather than from a TradingView quote.

VariablePurpose
USE_HARD_TARGETSMust be true for the live reversal trigger
STOP_LOSS_PIPS / TAKE_PROFIT_PIPSPip distances (overridable per instrument in SYMBOLS_FILE)
PIP_SIZEPrice per pip (overridable per instrument as pip_size)
PRICE_DIGITSQuote precision on the execution feed
MFE_BREAK_EVEN_PIPSAlso scaled by PIP_SIZE — see Break-even
Last updated on