/////////////////////////////////////////////////////// // // SaherElm IT Center MQL4 Models Global Library // --------------------------------------------- // saherelm useful tools and definitions ... // // // Maintainer: // ------------ // Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) // ////////////////////////////////////////////////////// #property library #property copyright "Copyright 2023, SaherElm IT Center" #property link "https://www.saherelm.ir" #property version "1.00" #property strict // // Start Models ... // // // Used Indicators List ... const string xmaIndicatorName = "x-saherelm.xma"; const string adxIndicatorName = "x-saherelm.adx"; const string oscIndicatorName = "x-saherelm.osc"; const string zigZagIndicatorName = "x-saherelm.zigzag"; // // Direction ... enum X_DIRECTION { X_UP, X_DOWN }; // // these are different signal types ... enum X_SIGNAL_TYPE { X_NONE, X_LONG, X_SHORT, }; // // we Model each signals as this type ... struct XSignal { int id; X_SIGNAL_TYPE type; double tp; double sl; string symbol; datetime time; double entryPrice; }; // // this is Signal Request Response model ... struct XSignalRequest { bool hasSignal; X_SIGNAL_TYPE type; XSignal signal; }; // // we model OSC Return Data ... struct XOSCState { // double fastOSC; double slowOSC; // double powerOSC; // double varOSC; // double tanFSOSC; }; // // Define a Model to Represent Snapshot of XMA Indicator ... struct XMAState { // // Short Cycle ... // // FAST ... double scFast; // // SLOW ... double scSlow; // bool isSCTrendUp; // // Medium Cycle ... // // FAST ... double mcFast; // // SLOW ... double mcSlow; // // Long Cycle ... // // FAST ... double lcFast; // // SLOW ... double lcSlow; // // MIDDLEAGE ... double marketMiddleage; // // PARABOLIC-SAR ... double parabolicSAR; }; // // End Models ... //