From 946b2bfe5887438cb70d2363a09814c14efcd7cc Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Sat, 10 Feb 2024 15:19:31 +0330 Subject: [PATCH] add support for XCTimer on XUSPY5 EA ... --- BKP/Main/Experts/x-saherelm.xuspy5.ea.mq5 | 53 ++++- .../x-saherelm.xctimer.indicator.mq5 | 206 ++++++++++++++++++ Experts/x-saherelm.xuspy5.ea.mq5 | 53 ++++- Indicators/x-saherelm.xctimer.indicator.mq5 | 206 ++++++++++++++++++ .../XUSPY5/Experts/x-saherelm.xuspy5.ea.mq5 | 53 ++++- .../x-saherelm.xctimer.indicator.mq5 | 206 ++++++++++++++++++ Projects/XUSPY5/Settings/longs.vbb.set | Bin 7598 -> 7798 bytes 7 files changed, 765 insertions(+), 12 deletions(-) create mode 100644 BKP/Main/Indicators/x-saherelm.xctimer.indicator.mq5 create mode 100644 Indicators/x-saherelm.xctimer.indicator.mq5 create mode 100644 Projects/XUSPY5/Indicators/x-saherelm.xctimer.indicator.mq5 diff --git a/BKP/Main/Experts/x-saherelm.xuspy5.ea.mq5 b/BKP/Main/Experts/x-saherelm.xuspy5.ea.mq5 index 49e3525e..351c8632 100644 --- a/BKP/Main/Experts/x-saherelm.xuspy5.ea.mq5 +++ b/BKP/Main/Experts/x-saherelm.xuspy5.ea.mq5 @@ -27,10 +27,16 @@ input group "Commons"; // -// END Inputs ... +// XCTIMER inputs ... +input bool xUSPY5ShowCandleTimer = true; // Show Condle Remaining Time +input color xUSPY5CandleTimerColot = clrYellow; // Candle Timer Color +input ENUM_BASE_CORNER xUSPY5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer + +// +// END Inputs ... // -// +// // START Including Providers ... // @@ -65,6 +71,9 @@ bool isXUSPY5NewHour; bool isXUSPY5NewDay; bool isXUSPY5NewWeek; bool isXUSPY5NewMonth; + +// +int xUSPY5CTimerHandler = INVALID_HANDLE; // // END Global Definitions: Variables, Properties and etc ... // @@ -104,6 +113,16 @@ int OnInit() return INIT_PARAMETERS_INCORRECT; } + // + // Init XCTimer ... + if (xUSPY5ShowCandleTimer) + { + if (!XUSPY5CTimerInit()) + { + return INIT_FAILED; + } + } + // // Init Succeed ... return INIT_SUCCEEDED; @@ -135,6 +154,9 @@ void OnDeinit(const int reason) // // De Init XDraw Library ... // OnDeinitDrawLibrary(); + + // + IndicatorRelease(xUSPY5CTimerHandler); } // @@ -266,7 +288,6 @@ void OnTick() SendAlert(message); } - // // Prevent Going Forward if user Disable it ... if (xUSPY5EnableProvider) @@ -275,7 +296,7 @@ void OnTick() // Handle Processing on XUSPY5 Signal Provider ... XUSPY5SignalProviderDoControlState(); } - + // // Check Can Ignore Tick or not .. bool canIgnoreTick = xUSPY5IsTestMode @@ -349,6 +370,30 @@ bool ValidateInputs() return result; } +bool XUSPY5CTimerInit() +{ + // + bool result = true; + + // + xUSPY5CTimerHandler = iCustom( + _Symbol, + _Period, + "x-saherelm.xctimer.indicator", + // + // Inputs ... + xUSPY5CandleTimerColot, + xUSPY5CandleTimerCorner); + + // + if (xUSPY5CTimerHandler == INVALID_HANDLE) + { + result = false; + } + + // + return result; +} // // END Functions ... // diff --git a/BKP/Main/Indicators/x-saherelm.xctimer.indicator.mq5 b/BKP/Main/Indicators/x-saherelm.xctimer.indicator.mq5 new file mode 100644 index 00000000..6a064212 --- /dev/null +++ b/BKP/Main/Indicators/x-saherelm.xctimer.indicator.mq5 @@ -0,0 +1,206 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 XCTimer Indicator +// --------------------------------------------- +// Name: XCTimer +// Description: Trend Magic Indicator ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://saherelm.ir" +#property version "1.00" +#property description "SaherElm XCTimer Indicator" +#property strict + +// +// START Constants ... +// +#define ShortName "XCTimer" +// +// END Constants ... +// + +// +// START Inputs ... +// +input color clr = clrYellow; +input ENUM_BASE_CORNER corner = CORNER_RIGHT_LOWER; +// +// END Inputs ... +// + +// +// START Buffers ... +// +// +// END Buffers ... +// + +// +// START Global Definitions: Variables, Properties and etc ... +// +// +// END Global Definitions: Variables, Properties and etc ... +// + +// +// START Event Handlers ... +// +// +// Initialization ... +int OnInit() +{ + // + // Validate Inputs ... + CreateIndicatorObject(); + + // + // Set Indicator ShortName ... + SetIndicatorName(); + + // + // Init Succeed ... + return INIT_SUCCEEDED; +} + +// +// DeInitialization ... +void OnDeinit(const int reason) +{ + // + // REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function + // REASON_REMOVE 1 Program removed from a chart + // REASON_RECOMPILE 2 Program recompiled + // REASON_CHARTCHANGE 3 A symbol or a chart period is changed + // REASON_CHARTCLOSE 4 Chart closed + // REASON_PARAMETERS 5 Inputs changed by a user + // REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings + // REASON_TEMPLATE 7 Another chart template applied + // REASON_INITFAILED 8 The OnInit() handler returned a non-zero value + // REASON_CLOSE 9 Terminal closed + + // + // Delete Object ... + ObjectDelete(0, ShortName); +} + +// +// Calculations ... +// +// Calculating what we want ... +int OnCalculate( + // + // total Candles on chart ... + const int rates_total, + // + // total calculated Candles on charts ... + const int prev_calculated, + // + // history of Candles Open Time ... + const datetime &time[], + // + // history of Candles Open Price ... + const double &open[], + // + // history of Candles High Price ... + const double &high[], + // + // history of Candles Low Price ... + const double &low[], + // + // history of Candles Close Price ... + const double &close[], + // + // history of Tick Volumes on Candle ... + const long &tick_volume[], + // + // history of Trade Volumes ... + const long &volume[], + // + // history of Candles Spread Price ... + const int &spread[]) +{ + // + ArraySetAsSeries(time, true); + + // + int m = int(time[0] + PeriodSeconds() - TimeCurrent()); + int s = m % 60; + m = (m - s) / 60; + + // + long mSpread = SymbolInfoInteger(Symbol(), SYMBOL_SPREAD); + + string _sp = "", _m = "", _s = ""; + if (mSpread < 10) + _sp = ".."; + else if (mSpread < 100) + _sp = "."; + if (m < 10) + _m = "0"; + if (s < 10) + _s = "0"; + + // + string objText = "Spread: " + IntegerToString(mSpread) + _sp + " Next Bar in " + _m + IntegerToString(m) + ":" + _s + IntegerToString(s); + + // + ObjectSetInteger(0, ShortName, OBJPROP_COLOR, clr); + ObjectSetString(0, ShortName, OBJPROP_TEXT, objText); + ObjectSetInteger(0, ShortName, OBJPROP_FONTSIZE, 10); + ObjectSetString(0, ShortName, OBJPROP_FONT, "Courier"); + + // + return rates_total; +} +// +// END Event Handlers ... +// + +// +// START Functions ... +// +// +// Set Indicator Short Name and also we can define Buffers Labels ... +void SetIndicatorName() +{ + IndicatorSetString(INDICATOR_SHORTNAME, ShortName); +} + +void CreateIndicatorObject() +{ + // + ObjectCreate(0, ShortName, OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, ShortName, OBJPROP_CORNER, corner); + ObjectSetInteger(0, ShortName, OBJPROP_XDISTANCE, 10); + ObjectSetInteger(0, ShortName, OBJPROP_YDISTANCE, 2); + ENUM_ANCHOR_POINT Anchor = ANCHOR_LEFT_UPPER; + switch (corner) + { + case CORNER_LEFT_UPPER: + Anchor = ANCHOR_LEFT_UPPER; + break; + case CORNER_RIGHT_UPPER: + Anchor = ANCHOR_RIGHT_UPPER; + break; + case CORNER_LEFT_LOWER: + Anchor = ANCHOR_LEFT_LOWER; + break; + case CORNER_RIGHT_LOWER: + Anchor = ANCHOR_RIGHT_LOWER; + break; + } + + // + ObjectSetInteger(0, ShortName, OBJPROP_ANCHOR, Anchor); +} +// +// END Functions ... +// diff --git a/Experts/x-saherelm.xuspy5.ea.mq5 b/Experts/x-saherelm.xuspy5.ea.mq5 index 49e3525e..351c8632 100644 --- a/Experts/x-saherelm.xuspy5.ea.mq5 +++ b/Experts/x-saherelm.xuspy5.ea.mq5 @@ -27,10 +27,16 @@ input group "Commons"; // -// END Inputs ... +// XCTIMER inputs ... +input bool xUSPY5ShowCandleTimer = true; // Show Condle Remaining Time +input color xUSPY5CandleTimerColot = clrYellow; // Candle Timer Color +input ENUM_BASE_CORNER xUSPY5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer + +// +// END Inputs ... // -// +// // START Including Providers ... // @@ -65,6 +71,9 @@ bool isXUSPY5NewHour; bool isXUSPY5NewDay; bool isXUSPY5NewWeek; bool isXUSPY5NewMonth; + +// +int xUSPY5CTimerHandler = INVALID_HANDLE; // // END Global Definitions: Variables, Properties and etc ... // @@ -104,6 +113,16 @@ int OnInit() return INIT_PARAMETERS_INCORRECT; } + // + // Init XCTimer ... + if (xUSPY5ShowCandleTimer) + { + if (!XUSPY5CTimerInit()) + { + return INIT_FAILED; + } + } + // // Init Succeed ... return INIT_SUCCEEDED; @@ -135,6 +154,9 @@ void OnDeinit(const int reason) // // De Init XDraw Library ... // OnDeinitDrawLibrary(); + + // + IndicatorRelease(xUSPY5CTimerHandler); } // @@ -266,7 +288,6 @@ void OnTick() SendAlert(message); } - // // Prevent Going Forward if user Disable it ... if (xUSPY5EnableProvider) @@ -275,7 +296,7 @@ void OnTick() // Handle Processing on XUSPY5 Signal Provider ... XUSPY5SignalProviderDoControlState(); } - + // // Check Can Ignore Tick or not .. bool canIgnoreTick = xUSPY5IsTestMode @@ -349,6 +370,30 @@ bool ValidateInputs() return result; } +bool XUSPY5CTimerInit() +{ + // + bool result = true; + + // + xUSPY5CTimerHandler = iCustom( + _Symbol, + _Period, + "x-saherelm.xctimer.indicator", + // + // Inputs ... + xUSPY5CandleTimerColot, + xUSPY5CandleTimerCorner); + + // + if (xUSPY5CTimerHandler == INVALID_HANDLE) + { + result = false; + } + + // + return result; +} // // END Functions ... // diff --git a/Indicators/x-saherelm.xctimer.indicator.mq5 b/Indicators/x-saherelm.xctimer.indicator.mq5 new file mode 100644 index 00000000..6a064212 --- /dev/null +++ b/Indicators/x-saherelm.xctimer.indicator.mq5 @@ -0,0 +1,206 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 XCTimer Indicator +// --------------------------------------------- +// Name: XCTimer +// Description: Trend Magic Indicator ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://saherelm.ir" +#property version "1.00" +#property description "SaherElm XCTimer Indicator" +#property strict + +// +// START Constants ... +// +#define ShortName "XCTimer" +// +// END Constants ... +// + +// +// START Inputs ... +// +input color clr = clrYellow; +input ENUM_BASE_CORNER corner = CORNER_RIGHT_LOWER; +// +// END Inputs ... +// + +// +// START Buffers ... +// +// +// END Buffers ... +// + +// +// START Global Definitions: Variables, Properties and etc ... +// +// +// END Global Definitions: Variables, Properties and etc ... +// + +// +// START Event Handlers ... +// +// +// Initialization ... +int OnInit() +{ + // + // Validate Inputs ... + CreateIndicatorObject(); + + // + // Set Indicator ShortName ... + SetIndicatorName(); + + // + // Init Succeed ... + return INIT_SUCCEEDED; +} + +// +// DeInitialization ... +void OnDeinit(const int reason) +{ + // + // REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function + // REASON_REMOVE 1 Program removed from a chart + // REASON_RECOMPILE 2 Program recompiled + // REASON_CHARTCHANGE 3 A symbol or a chart period is changed + // REASON_CHARTCLOSE 4 Chart closed + // REASON_PARAMETERS 5 Inputs changed by a user + // REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings + // REASON_TEMPLATE 7 Another chart template applied + // REASON_INITFAILED 8 The OnInit() handler returned a non-zero value + // REASON_CLOSE 9 Terminal closed + + // + // Delete Object ... + ObjectDelete(0, ShortName); +} + +// +// Calculations ... +// +// Calculating what we want ... +int OnCalculate( + // + // total Candles on chart ... + const int rates_total, + // + // total calculated Candles on charts ... + const int prev_calculated, + // + // history of Candles Open Time ... + const datetime &time[], + // + // history of Candles Open Price ... + const double &open[], + // + // history of Candles High Price ... + const double &high[], + // + // history of Candles Low Price ... + const double &low[], + // + // history of Candles Close Price ... + const double &close[], + // + // history of Tick Volumes on Candle ... + const long &tick_volume[], + // + // history of Trade Volumes ... + const long &volume[], + // + // history of Candles Spread Price ... + const int &spread[]) +{ + // + ArraySetAsSeries(time, true); + + // + int m = int(time[0] + PeriodSeconds() - TimeCurrent()); + int s = m % 60; + m = (m - s) / 60; + + // + long mSpread = SymbolInfoInteger(Symbol(), SYMBOL_SPREAD); + + string _sp = "", _m = "", _s = ""; + if (mSpread < 10) + _sp = ".."; + else if (mSpread < 100) + _sp = "."; + if (m < 10) + _m = "0"; + if (s < 10) + _s = "0"; + + // + string objText = "Spread: " + IntegerToString(mSpread) + _sp + " Next Bar in " + _m + IntegerToString(m) + ":" + _s + IntegerToString(s); + + // + ObjectSetInteger(0, ShortName, OBJPROP_COLOR, clr); + ObjectSetString(0, ShortName, OBJPROP_TEXT, objText); + ObjectSetInteger(0, ShortName, OBJPROP_FONTSIZE, 10); + ObjectSetString(0, ShortName, OBJPROP_FONT, "Courier"); + + // + return rates_total; +} +// +// END Event Handlers ... +// + +// +// START Functions ... +// +// +// Set Indicator Short Name and also we can define Buffers Labels ... +void SetIndicatorName() +{ + IndicatorSetString(INDICATOR_SHORTNAME, ShortName); +} + +void CreateIndicatorObject() +{ + // + ObjectCreate(0, ShortName, OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, ShortName, OBJPROP_CORNER, corner); + ObjectSetInteger(0, ShortName, OBJPROP_XDISTANCE, 10); + ObjectSetInteger(0, ShortName, OBJPROP_YDISTANCE, 2); + ENUM_ANCHOR_POINT Anchor = ANCHOR_LEFT_UPPER; + switch (corner) + { + case CORNER_LEFT_UPPER: + Anchor = ANCHOR_LEFT_UPPER; + break; + case CORNER_RIGHT_UPPER: + Anchor = ANCHOR_RIGHT_UPPER; + break; + case CORNER_LEFT_LOWER: + Anchor = ANCHOR_LEFT_LOWER; + break; + case CORNER_RIGHT_LOWER: + Anchor = ANCHOR_RIGHT_LOWER; + break; + } + + // + ObjectSetInteger(0, ShortName, OBJPROP_ANCHOR, Anchor); +} +// +// END Functions ... +// diff --git a/Projects/XUSPY5/Experts/x-saherelm.xuspy5.ea.mq5 b/Projects/XUSPY5/Experts/x-saherelm.xuspy5.ea.mq5 index 49e3525e..351c8632 100644 --- a/Projects/XUSPY5/Experts/x-saherelm.xuspy5.ea.mq5 +++ b/Projects/XUSPY5/Experts/x-saherelm.xuspy5.ea.mq5 @@ -27,10 +27,16 @@ input group "Commons"; // -// END Inputs ... +// XCTIMER inputs ... +input bool xUSPY5ShowCandleTimer = true; // Show Condle Remaining Time +input color xUSPY5CandleTimerColot = clrYellow; // Candle Timer Color +input ENUM_BASE_CORNER xUSPY5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer + +// +// END Inputs ... // -// +// // START Including Providers ... // @@ -65,6 +71,9 @@ bool isXUSPY5NewHour; bool isXUSPY5NewDay; bool isXUSPY5NewWeek; bool isXUSPY5NewMonth; + +// +int xUSPY5CTimerHandler = INVALID_HANDLE; // // END Global Definitions: Variables, Properties and etc ... // @@ -104,6 +113,16 @@ int OnInit() return INIT_PARAMETERS_INCORRECT; } + // + // Init XCTimer ... + if (xUSPY5ShowCandleTimer) + { + if (!XUSPY5CTimerInit()) + { + return INIT_FAILED; + } + } + // // Init Succeed ... return INIT_SUCCEEDED; @@ -135,6 +154,9 @@ void OnDeinit(const int reason) // // De Init XDraw Library ... // OnDeinitDrawLibrary(); + + // + IndicatorRelease(xUSPY5CTimerHandler); } // @@ -266,7 +288,6 @@ void OnTick() SendAlert(message); } - // // Prevent Going Forward if user Disable it ... if (xUSPY5EnableProvider) @@ -275,7 +296,7 @@ void OnTick() // Handle Processing on XUSPY5 Signal Provider ... XUSPY5SignalProviderDoControlState(); } - + // // Check Can Ignore Tick or not .. bool canIgnoreTick = xUSPY5IsTestMode @@ -349,6 +370,30 @@ bool ValidateInputs() return result; } +bool XUSPY5CTimerInit() +{ + // + bool result = true; + + // + xUSPY5CTimerHandler = iCustom( + _Symbol, + _Period, + "x-saherelm.xctimer.indicator", + // + // Inputs ... + xUSPY5CandleTimerColot, + xUSPY5CandleTimerCorner); + + // + if (xUSPY5CTimerHandler == INVALID_HANDLE) + { + result = false; + } + + // + return result; +} // // END Functions ... // diff --git a/Projects/XUSPY5/Indicators/x-saherelm.xctimer.indicator.mq5 b/Projects/XUSPY5/Indicators/x-saherelm.xctimer.indicator.mq5 new file mode 100644 index 00000000..6a064212 --- /dev/null +++ b/Projects/XUSPY5/Indicators/x-saherelm.xctimer.indicator.mq5 @@ -0,0 +1,206 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 XCTimer Indicator +// --------------------------------------------- +// Name: XCTimer +// Description: Trend Magic Indicator ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://saherelm.ir" +#property version "1.00" +#property description "SaherElm XCTimer Indicator" +#property strict + +// +// START Constants ... +// +#define ShortName "XCTimer" +// +// END Constants ... +// + +// +// START Inputs ... +// +input color clr = clrYellow; +input ENUM_BASE_CORNER corner = CORNER_RIGHT_LOWER; +// +// END Inputs ... +// + +// +// START Buffers ... +// +// +// END Buffers ... +// + +// +// START Global Definitions: Variables, Properties and etc ... +// +// +// END Global Definitions: Variables, Properties and etc ... +// + +// +// START Event Handlers ... +// +// +// Initialization ... +int OnInit() +{ + // + // Validate Inputs ... + CreateIndicatorObject(); + + // + // Set Indicator ShortName ... + SetIndicatorName(); + + // + // Init Succeed ... + return INIT_SUCCEEDED; +} + +// +// DeInitialization ... +void OnDeinit(const int reason) +{ + // + // REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function + // REASON_REMOVE 1 Program removed from a chart + // REASON_RECOMPILE 2 Program recompiled + // REASON_CHARTCHANGE 3 A symbol or a chart period is changed + // REASON_CHARTCLOSE 4 Chart closed + // REASON_PARAMETERS 5 Inputs changed by a user + // REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings + // REASON_TEMPLATE 7 Another chart template applied + // REASON_INITFAILED 8 The OnInit() handler returned a non-zero value + // REASON_CLOSE 9 Terminal closed + + // + // Delete Object ... + ObjectDelete(0, ShortName); +} + +// +// Calculations ... +// +// Calculating what we want ... +int OnCalculate( + // + // total Candles on chart ... + const int rates_total, + // + // total calculated Candles on charts ... + const int prev_calculated, + // + // history of Candles Open Time ... + const datetime &time[], + // + // history of Candles Open Price ... + const double &open[], + // + // history of Candles High Price ... + const double &high[], + // + // history of Candles Low Price ... + const double &low[], + // + // history of Candles Close Price ... + const double &close[], + // + // history of Tick Volumes on Candle ... + const long &tick_volume[], + // + // history of Trade Volumes ... + const long &volume[], + // + // history of Candles Spread Price ... + const int &spread[]) +{ + // + ArraySetAsSeries(time, true); + + // + int m = int(time[0] + PeriodSeconds() - TimeCurrent()); + int s = m % 60; + m = (m - s) / 60; + + // + long mSpread = SymbolInfoInteger(Symbol(), SYMBOL_SPREAD); + + string _sp = "", _m = "", _s = ""; + if (mSpread < 10) + _sp = ".."; + else if (mSpread < 100) + _sp = "."; + if (m < 10) + _m = "0"; + if (s < 10) + _s = "0"; + + // + string objText = "Spread: " + IntegerToString(mSpread) + _sp + " Next Bar in " + _m + IntegerToString(m) + ":" + _s + IntegerToString(s); + + // + ObjectSetInteger(0, ShortName, OBJPROP_COLOR, clr); + ObjectSetString(0, ShortName, OBJPROP_TEXT, objText); + ObjectSetInteger(0, ShortName, OBJPROP_FONTSIZE, 10); + ObjectSetString(0, ShortName, OBJPROP_FONT, "Courier"); + + // + return rates_total; +} +// +// END Event Handlers ... +// + +// +// START Functions ... +// +// +// Set Indicator Short Name and also we can define Buffers Labels ... +void SetIndicatorName() +{ + IndicatorSetString(INDICATOR_SHORTNAME, ShortName); +} + +void CreateIndicatorObject() +{ + // + ObjectCreate(0, ShortName, OBJ_LABEL, 0, 0, 0); + ObjectSetInteger(0, ShortName, OBJPROP_CORNER, corner); + ObjectSetInteger(0, ShortName, OBJPROP_XDISTANCE, 10); + ObjectSetInteger(0, ShortName, OBJPROP_YDISTANCE, 2); + ENUM_ANCHOR_POINT Anchor = ANCHOR_LEFT_UPPER; + switch (corner) + { + case CORNER_LEFT_UPPER: + Anchor = ANCHOR_LEFT_UPPER; + break; + case CORNER_RIGHT_UPPER: + Anchor = ANCHOR_RIGHT_UPPER; + break; + case CORNER_LEFT_LOWER: + Anchor = ANCHOR_LEFT_LOWER; + break; + case CORNER_RIGHT_LOWER: + Anchor = ANCHOR_RIGHT_LOWER; + break; + } + + // + ObjectSetInteger(0, ShortName, OBJPROP_ANCHOR, Anchor); +} +// +// END Functions ... +// diff --git a/Projects/XUSPY5/Settings/longs.vbb.set b/Projects/XUSPY5/Settings/longs.vbb.set index cfa559b5997ad9dd2fc7c4d9a70d39a40219d1ad..15ee180de514e8dc0e7fa228794792e262bd6c1c 100644 GIT binary patch delta 1101 zcmZXT-%Aux6vq#(JF`2pKW2BFW_M;c6qJZ4%6}Kd#lKOk`bO2iO3c+Um+Ed&-sjH~7yNgKD~gNX{Jj(pscGz0 zx+yLy?5ik~lpj(H&2n`kqV7qley*;pPLV4U=ptSUoF#rA$OUOOT(d1a6^!6cpat&* z6;gS@GsKOCjf!@a;ts8!_-O2%mZi9&^%0kJ7YFqO&g+J_*&wf#EnJXBAhP)3B7Yj*EuFp1dgiliZf9)l5s1%m>EA&|CWFkmnPl12Ln%WdLk>d-LjXfCL(b$xaZ9l3ZZ5^i99%kJwl$Y0R1D(s z_gtEwO^h%c`TKtfSp5TbgzU@cgcv`{UCz-)67bugVO0kLHKDE*NN+8$>tUcCgsw zg<_CYQZ1nkcIR4&R4^?m387mhv%&oDlDc48TMCj=X2NOd$#;aM;Qp