ApplyTrailingStop() runs every 5s on open positions: activates after 1000 pts (100 pips) of profit, trails SL 500 pts (50 pips) behind price. SL only moves in the profitable direction, never backwards. New inputs: InpUseTrailingStop, InpTrailStart, InpTrailStop (all presets set to true/1000/500). EA version bumped 5.0 → 5.1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
; === OrdersEA_Smart_Grid_BO - XAUUSD (Gold) ===
|
|
; Strongest trending instrument — excellent BO candidate on macro events
|
|
; Timeframe: H1
|
|
; WARNING: 500+ pt moves on FOMC, NFP, geopolitical shocks — SL is critical
|
|
|
|
; === Grid / BO Settings ===
|
|
UseAutoPivots=true
|
|
InpManualHigh=0
|
|
InpManualLow=0
|
|
Entry=100
|
|
TP=5000
|
|
Lots=1.00
|
|
MaxLevels=2
|
|
|
|
; === Range Filters ===
|
|
UseRSIFilter=false
|
|
RSIPeriod=14
|
|
RSILower=40
|
|
RSIUpper=60
|
|
UseADXFilter=true
|
|
ADXPeriod=14
|
|
ADXMax=30
|
|
UseATRFilter=true
|
|
ATRPeriod=14
|
|
ATRMultiplier=2.5
|
|
|
|
; === Stop Loss (MANDATORY — Gold can wipe 500 pts without SL) ===
|
|
InpUseStopLoss=true
|
|
StopLoss=1500
|
|
|
|
; === Trailing Stop ===
|
|
InpUseTrailingStop=true
|
|
InpTrailStart=1000
|
|
InpTrailStop=500
|
|
|
|
; === Risk Management ===
|
|
TRADE_RANGE=200
|
|
LongLimit=0
|
|
ShortLimit=0
|
|
GetOut=N
|
|
OpenNewTrades=Y
|
|
TakeProfitLevelPercent=0
|
|
TakeProfitLevelDollarAmount=0
|
|
EquityFactorPercent=0
|
|
LotsFactorPercent=0
|
|
BaseEquity=10000
|
|
Master=false
|
|
DiagnosticModeOn=true
|
|
InpMaxDailyDrawdown=3.0
|
|
InpMaxWeeklyDrawdown=7.0
|
|
|
|
; === Weekend Protection ===
|
|
InpCloseBeforeWeekend=true
|
|
InpWeekendCloseHour=17
|
|
InpCancelPendingBeforeWeekend=true
|
|
|
|
; === EA Settings ===
|
|
MagicNum=444013
|
|
|
|
; === Session Notes ===
|
|
; Best BO events: FOMC decisions, NFP, geopolitical escalation, CPI surprises
|
|
; Gold trends very cleanly once ADX > 30
|
|
; ADXMax=30 set higher than other pairs — Gold needs confirmed trend before BO fires
|
|
; Avoid thin Asian overnight sessions for BO entry
|