71 lines
2.6 KiB
Plaintext
71 lines
2.6 KiB
Plaintext
///////////////////////////////////////////////////////////////
|
|
//
|
|
// SaherElm IT Center MQL5 XMAP Signal Provider Library Inputs
|
|
// -----------------------------------------------------------
|
|
// Name: XMAPSignalProvider
|
|
// Description: XMAP based signal provider ...
|
|
//
|
|
//
|
|
// Maintainer:
|
|
// ------------
|
|
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
|
//
|
|
//////////////////////////////////////////////////////
|
|
//
|
|
// Global Properties ...
|
|
#property library
|
|
#property copyright "Copyright 2023, SaherElm IT Center"
|
|
#property link "https://www.saherelm.ir"
|
|
#property version "1.00"
|
|
#property strict
|
|
|
|
//
|
|
input group "XMAP Provider";
|
|
|
|
//
|
|
input group "XMAP Common";
|
|
input bool enableXMAPProvider = true; // Enable Provider
|
|
input bool xMAPEnableAlerts = false; // Enable Events Alert
|
|
input int xMAPNumberOfItemsPerTick = 72; // Number Of items Readed In Each Tick
|
|
|
|
//
|
|
input group "XMAP Trader";
|
|
input int xMAPMagicNumber = 16940564; // Trader MagicNumber
|
|
input int xMAPSlippage = 10; // Trader Slippage
|
|
|
|
//
|
|
input group "XMAP Trade Management";
|
|
input bool xMAPAllowLongTrades = true; // Allow Long Trades
|
|
input bool xMAPAllowShortTrades = false; // Allow Short Trades
|
|
|
|
//
|
|
input group "XMAP Risk Management";
|
|
input int xMAPMaxAllowedPrimaryTrades = 1; // Max Allowed Primary Trades at same time
|
|
input int xMAPMaxPrimaryTradeAge = 0; // Maximum Candles which a Primary Trade Can Open
|
|
input int xMAPMaxAllowedGridTrades = 0; // Max Allowed Grid Trade belongs to one Primary Trade
|
|
input double xMAPGridPriceDistanceInPips = 5; // Price Distance In Pips from Primary Trade to Open a Grid Trade
|
|
input int xMAPMaxGridTradeAge = 0; // Maximum Candles which a Grid Trade Can Open
|
|
input int xMAPGridVolumeMultiplier = 2; // Grid Trades Volume Multiplier
|
|
input double xMAPStaticVolume = 0.01; // Static Volume
|
|
input double xMAPMinRewardPerTradeInPips = 1; // Min Reward Per Trade In Pips
|
|
input double xMAPFreeMarginFactorForOpenTrades = 0.5; // Minimum Free Marging for Open Trades
|
|
input double xMAPBalanceFactorForOpenTrades = 0.5; // Minimum Balance for Open Trades
|
|
input double xMAPMaxDrawDownPerTradeFactor = 0; // Max Allowed DrawDown Factor Per Trade
|
|
// input bool xMAPUseDynamicVolume = false; // Enable Dynamic Volume
|
|
// input double xMAPBalanceIncreased = 500; // Balance Increase
|
|
// input double xMAPVolumeIncreased = 0.01; // Volume Increase
|
|
|
|
//
|
|
// Validate Inputs before Initialization ...
|
|
bool XMAPValidateInputs()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
// TODO: Fix this ...
|
|
result = true;
|
|
|
|
//
|
|
return result;
|
|
} |