This commit is contained in:
2024-12-29 17:46:35 +03:30
parent e831ce8a91
commit c92f2570c7
12 changed files with 944 additions and 864 deletions
@@ -89,6 +89,13 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
return mPeriod;
}
/**
* Retrieve POI Drawer Instance Pointer ...
**/
XCPOIDrawer* GetDrawer() {
return mPOIDrawer;
}
/**
* Check Strategy is Disabled or not ...
*
@@ -727,66 +734,6 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
//
// Draw Functions ...
/**
* Draw Specified Signal ...
*
* @param signal: XSignal instance ...
*/
void DrawSignal(XSignal &signal)
{
//
if (!signal.IsValid())
{
return;
}
//
// DrawConditions(conditions);
//
string name = signal.GetTag();
RemoveObject(name);
//
XCSignalObject *iObj;
iObj = new XCSignalObject();
//
bool isCreated = iObj.Create(
ChartIdentification(),
name,
SubWindowIdentification(),
signal //
);
if (!isCreated)
{
return;
}
//
iObj.TPWidth(1);
iObj.TPColor(clrGreen);
iObj.TPWidth(STYLE_DOT);
//
iObj.SLWidth(1);
iObj.SLColor(clrRed);
iObj.SLWidth(STYLE_DOT);
//
iObj.TargetWidth(1);
iObj.TargetColor(clrLightBlue);
iObj.TargetWidth(STYLE_DOT);
//
iObj.EntryWidth(1);
iObj.EntryColor(clrYellow);
iObj.EntryWidth(STYLE_DOT);
//
// mDrawnObjects.Add(iObj);
}
/**
* Clear all Drawn Objects ...
*/
@@ -26,6 +26,7 @@
#include "../../Classes/x-saherelm.x-alert.class.mq5"
#include "../../Classes/x-saherelm.x-bar.analyser.class.mq5"
#include "../../Classes/x-saherelm.x-trade.class.mq5"
#include "../../Classes/x-saherelm.x-poi.drawer.class.mq5"
//
// Definitions ...
@@ -2204,6 +2205,32 @@ class XC121SMCTradeHandler : public XCBaseAlert
mHedgeingMinRequiredProfitPerVolumeStep = value;
}
/**
* Get POI Drawer instance Pointer ...
*/
XCPOIDrawer *GetDrawer()
{
return mDrawer;
}
/**
* Get POI Drawer instance Pointer ...
*/
void SetDrawer(XCPOIDrawer *drawer)
{
mDrawer = drawer;
}
/**
* Check Darwer Exists Before Draw anything ...
*
* @return ( bool )
*/
bool CanDraw()
{
return mDrawer != NULL;
}
//
// Actions ...
@@ -3133,6 +3160,12 @@ class XC121SMCTradeHandler : public XCBaseAlert
//
// Add XTradeHandler Data ...
Add(signal);
if (CanDraw())
{
//
XCSignalObject *iObj;
mDrawer.DrawSignal(signal, iObj);
}
//
// Handle Last Executed Signal ...
@@ -3607,6 +3640,7 @@ class XC121SMCTradeHandler : public XCBaseAlert
//
XCBarAnalyser mBarAnalyser;
XCPOIDrawer *mDrawer;
//
// Common Functions ...