85 lines
2.7 KiB
Plaintext
85 lines
2.7 KiB
Plaintext
///////////////////////////////////////////////////////////////
|
|
//
|
|
// SaherElm IT Center MQL5 XEU5 Signal Provider Library Inputs
|
|
// -----------------------------------------------------------
|
|
//
|
|
// 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 "XEU5 Provider";
|
|
|
|
//
|
|
input group "XEU5 Common";
|
|
input bool xEU5EnableProvider = true; // Enable Provider
|
|
input bool xEU5EnableAlerts = false; // Enable Events Alert
|
|
input int xEU5NumberOfItemsPerTick = 30; // Number Of items Readed In Each Tick
|
|
|
|
//
|
|
input group "XEU5 Trader";
|
|
input int xEU5MagicNumber = 16940561; // Trader MagicNumber
|
|
input int xEU5Slippage = 10; // Trader Slippage
|
|
|
|
//
|
|
input group "XEU5 Trade Management";
|
|
input bool xEU5AllowLongTrades = false; // Allow Long Trades
|
|
input bool xEU5AllowShortTrades = true; // Allow Short Trades
|
|
|
|
//
|
|
input group "XEU5 Risk Management";
|
|
//
|
|
// Trade Count ...
|
|
input int xEU5MaxAllowedTrades = 1; // Max Allowed Trades at Same Time
|
|
//
|
|
// Trades Age ...
|
|
// 1 Day = 288
|
|
// 14 Day = 4320
|
|
input int xEU5MaxInProfitTradeAge = 0; // Max In Profit Trades Age
|
|
input int xEU5MaxInDrawDownTradeAge = 0; // Max In DrawDown Trades Age
|
|
//
|
|
// Trade Volume ...
|
|
input double xEU5StaticVolume = 0.3; // Static Volume
|
|
input double xEU5VolumeMultiplier = 2; // Volume Multiplier
|
|
input double xEU5MaxSupportedVolumePerTradeInLots = 1.5; // Max Supported Volume Per Trade in Lot
|
|
//
|
|
// Trade Profits ...
|
|
input double xEU5MinRewardInPips = 15; // Minimum Reward Per Trade in Pips
|
|
input double xEU5RiskFreeStepInPips = 3; // Risk Free Steps in Pips
|
|
input double xEU5RiskFreeRate = 0.5; // Volume Multiplier for Risk Free
|
|
//
|
|
input double xEU5MaxAllowedRiskPerTradesMultiplier = 0; // Max Allowed Drawdown Per Trade Multiplier
|
|
//
|
|
// Account ...
|
|
input double xEU5FreeMarginFactorForOpenTrades = 0.8; // Minimum Free Marging for Open Trades
|
|
input double xEU5BalanceFactorForOpenTrades = 0.5; // Minimum Balance for Open Trades
|
|
|
|
//
|
|
input group "XEU5 Support Trades";
|
|
input bool xEU5EnableIndirectionalSupportPositions = false; // Enable Reversal Support Positions
|
|
input int xEU5MaxAllowedSupportTrades = 0; // Max Allowed Support Trades for Single Position
|
|
input double xEU5SupportTradesPriceDistanceInPips = 0; // Distance Price to Open Support Trade In Pips
|
|
|
|
//
|
|
// Validate Inputs before Initialization ...
|
|
bool XEU5ValidateInputs()
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
// TODO: Fix this ...
|
|
result = true;
|
|
|
|
//
|
|
return result;
|
|
} |