ICTLibraryExamples/Base/Extra/SmtDivergence/Main.mqh
84 lines
5.9 KiB
MQL5
Nique_372
2025-12-10 13:42:49 -05:00
<EFBFBD><EFBFBD>//+------------------------------------------------------------------+
//| Main.mqh |
//| Copyright 2025, Niquel Mendoza. |
//| https://www.mql5.com/es/users/nique_372/news |
//+------------------------------------------------------------------+
Nique_372
2026-01-06 06:46:34 -05:00
Nique_372
2025-12-10 13:42:49 -05:00
#property copyright "Copyright 2025, Niquel Mendoza."
#property link "https://www.mql5.com/es/users/nique_372/news"
#property strict
Nique_372
2025-12-10 13:42:49 -05:00
#include "..\\..\\..\\DefGlobal.mqh"
Nique_372
2025-12-10 13:42:49 -05:00
//+------------------------------------------------------------------+
//| Int<EFBFBD>rprete personalizado de SMT |
//+------------------------------------------------------------------+
class CSmtInterprete : public ISmtInterprete
Nique_372
2025-12-10 13:42:49 -05:00
{
private:
bool m_use_default;
public:
CSmtInterprete(bool use_def) : m_use_default(use_def) {}
~CSmtInterprete() {}
//---
bool AnalizeCurrentDivergence(
const int total_symbols,
const SmtDivergenceInfo& data[],
int &out_idx_diverge[],
Nique_372
2025-12-10 13:42:49 -05:00
int& out_res,
string& txt[]
) override
{
if(total_symbols != 2)
{
LogFatalError("Solo se permiten Dos simbolos", FUNCION_ACTUAL);
Remover();
return false;
Nique_372
2025-12-10 13:42:49 -05:00
}
//---
if(data[0].divergence_type != data[1].divergence_type) // Diverge
{
//--- Determinamos la se<EFBFBD>al