MQLArticles/PosMgmt/TSL/Manager/Def.mqh
Nique_372 Nique_372 540afd18ce
2026-10-29 12:48:36 -05:00
47 lines
1.8 KiB
MQL5
//+------------------------------------------------------------------+
//| Def.mqh |
//| Copyright 2026, Niquel Mendoza. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2026, Niquel Mendoza."
#property link "https://www.mql5.com"
#property strict
#ifndef MQLARTICLES_POSMGMT_TSL_MANAGER_DEF_MQH
#define MQLARTICLES_POSMGMT_TSL_MANAGER_DEF_MQH
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
#include "..\\Int\\All.mqh"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
namespace TSN
{
//+------------------------------------------------------------------+
//| Clase Manager para hacer el TrailingStop |
//+------------------------------------------------------------------+
//---
const string TrailingStopNames[TRAILING_STOP_MODE_BASIC_TOTAL] = { "Sar", "Swings", "Point", "Ma", "PrevLowHigh", "Atr", "Ama"};
//---
#define TSNMQLA_TSL_TO_STRING(mode) TrailingStopNames[mode]
//--- Defines
#define TSNMQLA_ERROR_TSL_INVALID_PARAM 1
//---
enum ENUM_TRAILING_MANAGER_ERR
{
TRAILING_MANAGER_ERR_NOT,
TRAILING_MANAGER_ERR_INVALID_IDX,
TRAILING_MANAGER_ERR_INVALID_NUM_PARAMETERS,
TRAILING_MANAGER_ERR_TSL_IN_SET_PARAMETERS_VAL,
};
//---
}
//+------------------------------------------------------------------+
#endif // MQLARTICLES_POSMGMT_TSL_MANAGER_DEF_MQH