Westernpips DocsWesternpips Docs
  • Home
  • FAQ
  • Documentation
  • Forums
  • Home
  • FAQ
  • Documentation
  • Forums
  • Crypto Trader
    • Crypto Scanner - 1 Leg
    • Crypto Scanner - 2 Leg
    • Crypto Table
  • Getting Started
    • Web Portal my.westernpips.com
      • Web Portal Password Recovery
      • How to Buy Westernpips Products?
    • Products Installation
    • Prerequisites
      • .NET Desktop Runtime Installation
      • ASP.NET Core Runtime Installation
      • Microsoft Redistributable Installation
    • System Requirements
    • Installation Troubleshooting
  • Westernpips Golden Tools 3.5.7
    • Downloading
    • First Run
    • Installing a Westernpips Products Using WGT
    • Working with Installed Products
    • WGT Update
  • Westernpips Private 7
    • How to Check Which Quote Feed Is Faster
    • Installing and First Run
    • License Activation and Login
    • Change License IP, Add new IP
    • User Interface
      • Main Window
      • Dashboard
        • Options
        • Strategies
        • Connections
        • Schedulers
    • Trades Discovery, Check Orders Duration
    • WESTERNPIPS PRIVATE 7 ALGOS
      • OneLeg
        • OneLeg: Before You Start
        • OneLeg First Setup, Step by Step
        • OneLeg Key Parameters with an XAUUSD Example
        • OneLeg Troubleshooting
      • Two Leg Simple Hedge
      • Two Leg Lock
      • Multi Leg Spread
      • One Leg Multi
      • OneLegHidden
      • Two Leg Standard
      • Remote
      • Copier
      • Clicker in WesternPips Private 7
      • Session Control — Quick Guide
      • Exucution Control — Quick Guide
      • Slippage Control - Fast Guide
      • Add/Edit Provider Window Settings
      • BackTester
      • Setting up a connection with the Broker Terminal via the EA connector
    • Connectors
      • Common Settings and Operation
        • FIX Connection Settings
        • FIX Logs
      • Trading and Fast Sources Connectors
        • 24Exchange Connector
        • Active Financial API Connector
        • Binance Connector
        • Bitfinex Connector
        • CBOE FIX Connector
        • Celer FIX Connector
        • CFH FIX Connector
        • CTrader FIX Connector
        • DukasCopy FIX Connector
        • DxFeed FIX Connector
        • Euronext FIX Connector
        • Exante FIX Connector
        • FastMatch ITCH Connector
        • FlexTrade FIX Connector
        • Fortex FIX Connector
        • FXCM FIX Connector
        • FxPig FIX Connector
        • GCEX FIX Connector
        • Gold-i Matrix FIX Connector
        • Integral FIX Connector
        • LMAX API Connector
        • LMAX FIX Connector
        • MaxxTrader FIX Connector
        • MT EA Connector
        • M4 Server Connector
        • M5 Server Connector
        • OGM FIX Connector
        • OKX Connector
        • OneZero FIX Connector
        • PrimeXM FIX Connector
        • Remote Connector
        • Rithmic Connector
        • RoE FIX Connector
        • Saxo FIX Connector
        • SolidFX FIX Connector
        • Spotex FIX Connector
        • TraderMade FIX Connector
        • Universal Connector
        • Universal Fast Connector
        • XenFin FIX Connector
        • XTRD FIX Connector
  • Westernpips Webcliker
    • System Requirements
    • Installer
    • Agent
    • UI Settings
    • UI Logs
    • Start/Stop
    • Connections
    • Trade platforms
      • CMC Markets
      • M5 Web
      • M4 Web
      • TRADE NATION
      • Exness Web
      • Universal cliker
      • IG Trading Platform
      • MEX / MultiBank
      • ByBit
      • EXANTE
      • IQ Option
      • Plus500
      • Quotex
    • Risk Warning
  • Glossary
    • Latency Arbitrage
    • Fast Price Feed
    • Execution Latency
    • Slippage
    • FIX API
    • Requote
    • Forex Arbitrage
    • Toxic Flow
    • Last Look
    • B-Book
    • Forex VPS
    • Brokers That Allow Arbitrage
    • Low Latency

Session Control — Quick Guide

274 views 1

Session Control — Quick Guide

Session Control — Quick Guide - sescontr

What these settings do

The Session Control module in Westernpips Private 7 is designed to protect your strategy from uncontrolled losses and technical desynchronization.
It manages the session balance, drawdown control, and emergency state for all OneLeg-based algorithms (especially OneLegMulti).

⚙️ Settings Overview

Setting Type Default Description
InitialBalancePt integer 10 000 Starting equity of the trading session in points, used as a base for drawdown calculations.
UseMaximumDrawdown boolean true Enables automatic drawdown control.
MaximumDrawdown(%) integer 10 Defines the maximum allowed drawdown percentage from the session’s highest equity.
UseEmergencyClose boolean true Enables automatic emergency state when order desynchronization is detected.

🧭 1. InitialBalancePt

What it does

Defines the starting equity in points for your session.
This is the anchor for calculating drawdown limits.
If set to 0, the system immediately triggers “Drawdown Reached” and stops opening trades.

Formula

DrawdownEquityThresholdPt = MaximumEquityPt - (0.01 × MaximumEquityPt × MaximumDrawdown%)
Trading Style Suggested Value
Low-volatility / Scalping 5 000–10 000 pt
Normal trading session 10 000–20 000 pt
High-volatility / Long sessions 20 000–50 000 pt

Always use values greater than 0 and measure them in points (not money).

⚙️ 2. UseMaximumDrawdown

Description

Activates or deactivates automatic drawdown control.
When enabled, the controller continuously tracks your session equity in points:

  • Each time the equity reaches a new high, MaximumEquityPt is updated.

  • If the equity falls below the calculated threshold, state changes to DrawdownReached and new entries are blocked.

When disabled, 100% drawdown is allowed — protection is effectively off.

Recommendation

Always keep enabled for live or demo trading.
Disable only during debugging or experimental testing.


⚙️ 3. UseEmergencyClose

Description

Monitors synchronization between strategy orders and broker-side live orders.
If a mismatch is detected (for example, due to network delay or manual intervention),
the session automatically enters Emergency mode.

Behavior

  • Checked every 5 seconds.

  • If mismatch detected → State = Emergency, StateChanged = true.

  • In Emergency:

    • No new trades can be opened.

    • Existing trades are not managed automatically until reset.

Recommendation

Keep ON at all times during real trading — prevents “ghost” or stuck orders.
Use external alerts or your Telegram bot to notify about the Emergency state.


⚙️ 4. MaximumDrawdown(%)

What it does

Specifies the maximum percentage of loss from the session’s highest equity before trading halts.

Example

If InitialBalancePt = 10 000 and MaximumDrawdown = 10% →
the threshold is 9 000 pt.
If the equity later rises to 12 000, the threshold moves to 10 800 pt (trailing logic).

Recommended Values

Risk Profile MaximumDrawdown(%)
Conservative 5–8%
Balanced 10–15%
Aggressive 18–25%

🔁 5. How the System Works Step-by-Step

  1. Session Start

    • InitialBalancePt sets the reference equity.

    • MaximumEquityPt is initialized to the same value.

    • The drawdown threshold is calculated.

    • UseMaximumDrawdown and UseEmergencyClose define session behavior.

  2. Active Trading

    • While state = Trading, the algorithm can open and close trades freely.

  3. Trailing Drawdown

    • Each new profit peak increases MaximumEquityPt.

    • The drawdown threshold moves upward accordingly.

  4. Drawdown Trigger

    • If sessionEquityPt ≤ DrawdownEquityThresholdPt,
      state switches to DrawdownReached → new trades blocked.

  5. Emergency Trigger

    • If order mismatch detected, state switches to Emergency.

    • Normal trade management is paused until manually reset.

  6. Recovery

    • After checking positions and restarting strategy,
      use SwitchToTrading() or restart the algo to resume.


📊 6. Preset Templates

Profile InitialBalancePt MaximumDrawdown(%) UseMaximumDrawdown UseEmergencyClose
Safe 10 000 8–10% ✅ ✅
Balanced 15 000–20 000 12–15% ✅ ✅
Aggressive 20 000–30 000 18–25% ✅ ✅

⚠️ 7. Typical Mistakes & Fixes

Mistake Result Fix
InitialBalancePt = 0 Instant DrawdownReached (trading blocked) Always use > 0
Too small InitialBalancePt Frequent false drawdowns Increase value or reduce drawdown %
UseEmergencyClose = false Stuck or ghost orders possible Keep enabled
Disabled UseMaximumDrawdown No drawdown protection Avoid in live trading

💡 8. Calculation Examples by Symbol

Symbol Tick Size Avg. Daily Range Recommended InitialBalancePt Explanation
EURUSD 0.0001 ≈ 900 pt (≈ 90 pips) 10 000 pt Covers ~10 daily ranges; 10% drawdown = 900 pt
XAUUSD (Gold) 0.01 ≈ 2 000 pt (≈ 20 USD) 20 000 pt 10% drawdown ≈ 2 000 pt ($20 move)
BTCUSD 1 USD ≈ 5 000 pt 50 000 pt 20% drawdown = 10 000 pt ($10k BTC move)
GER30 (DAX) 0.1 ≈ 3 000 pt 30 000 pt 15% drawdown = 4 500 pt
US30 (Dow Jones) 1 USD ≈ 4 000 pt 40 000 pt 10% drawdown = 4 000 pt

Example — EURUSD

InitialBalancePt = 10 000
MaximumDrawdown = 10%

Threshold = 10 000 − (0.01 × 10 000 × 10) = 9 000 pt
If equity drops below 9 000 → DrawdownReached → new entries disabled.
If later equity grows to 11 500 → new threshold = 10 350 pt.


Example — XAUUSD

InitialBalancePt = 20 000
MaximumDrawdown = 10%

Threshold = 20 000 − 2 000 = 18 000 pt
Trading stops if equity drops below 18 000 pt.


Example — BTCUSD

InitialBalancePt = 50 000
MaximumDrawdown = 20%

Threshold = 50 000 − 10 000 = 40 000 pt
Trading halts after ~$10 000 loss from session high.


Example — GER30

InitialBalancePt = 30 000
MaximumDrawdown = 15%

Threshold = 30 000 − 4 500 = 25 500 pt.


Example — US30

InitialBalancePt = 40 000
MaximumDrawdown = 10%

Threshold = 40 000 − 4 000 = 36 000 pt.


✅ Summary

Setting Purpose Default Recommended
InitialBalancePt Base session equity in points 10 000 10 000–50 000
UseMaximumDrawdown Enables drawdown protection True True
MaximumDrawdown(%) % loss allowed from equity high 10 8–15
UseEmergencyClose Emergency protection for desync True True


Was this helpful?

1 Yes  No
Related Articles
  • Low Latency
  • Brokers That Allow Arbitrage
  • Forex VPS
  • B-Book
  • Last Look
  • Toxic Flow
Previously
Clicker in WesternPips Private 7
Up Next
Exucution Control — Quick Guide
  • Copyright 2026 Westernpips.com. All Rights Reserved.

LiveInternet counter