add clean XTradeDays and XMarketSessions Drawn Objects Support ...

This commit is contained in:
2024-10-21 17:29:53 +03:30
parent 4de2c7b31c
commit 006816e957
2 changed files with 33 additions and 23 deletions
+20 -5
View File
@@ -96,11 +96,6 @@ class XCFromToObject : public CChartObject
// Deconstructors ... // Deconstructors ...
void ~XCFromToObject() void ~XCFromToObject()
{ {
//
mToVLine.Detach();
mFromVLine.Detach();
mToVLine.Delete();
mFromVLine.Delete();
} }
/** /**
@@ -242,6 +237,16 @@ class XCTardeDayObject : public XCFromToObject
{ {
} }
/**
* Create Object Based on Given Structure ...
*
* @param chart_id: Long ...
* @param name: String ...
* @param window: Integer ...
* @param day: XTradeDay instance ...
*
* @return ( bool )
*/
bool CreateByDay( bool CreateByDay(
long chart_id, long chart_id,
const string name, const string name,
@@ -306,6 +311,16 @@ class XCMarketSessionObject : public XCFromToObject
{ {
} }
/**
* Create Object Based on Given Structure ...
*
* @param chart_id: Long ...
* @param name: String ...
* @param window: Integer ...
* @param session: XMarketSession instance ...
*
* @return ( bool )
*/
bool CreateByMarketSession( bool CreateByMarketSession(
long chart_id, long chart_id,
const string name, const string name,
+13 -18
View File
@@ -2395,14 +2395,6 @@ class XCPOI : public XSCBaseAlert
DestroyMarketSessionObjects(); DestroyMarketSessionObjects();
} }
/**
* Clean Trading Day Drawn Objects ...
*/
void DestroyTradingTradingDayObjects()
{
mTradingDayObjects.Clear();
}
/** /**
* Clean Swing Highs Drawn Objects ... * Clean Swing Highs Drawn Objects ...
*/ */
@@ -2435,13 +2427,20 @@ class XCPOI : public XSCBaseAlert
mRejectionBarObjects.Clear(); mRejectionBarObjects.Clear();
} }
/**
* Clean Trading Day Drawn Objects ...
*/
void DestroyTradingTradingDayObjects()
{
mTradingDayObjects.Clear();
}
/** /**
* Destroy Market Sessions Drawn Objects ... * Destroy Market Sessions Drawn Objects ...
*/ */
void DestroyMarketSessionObjects() void DestroyMarketSessionObjects()
{ {
// mMarketSessionObjects.Clear();
// TODO: Implement this ...
} }
// //
@@ -3022,6 +3021,9 @@ class XCPOI : public XSCBaseAlert
// //
iObj.ToColor(TradingDaysEndColor()); iObj.ToColor(TradingDaysEndColor());
iObj.ToStyle(TradingDaysEndStyle()); iObj.ToStyle(TradingDaysEndStyle());
//
mTradingDayObjects.Add(iObj);
} }
// //
@@ -3083,14 +3085,7 @@ class XCPOI : public XSCBaseAlert
iObj.ToStyle(mSessions[sessionIDX].endStyle); iObj.ToStyle(mSessions[sessionIDX].endStyle);
// //
string msg = mMarketSessionObjects.Add(iObj);
ToString(session.session) + "\n" +
"Offset: " + ToString(TimeGMTOffset()) + "\n" +
"LOffset: " + ToString(GetLocalOffset()) + "\n" +
"UTCROffset: " + ToString(GetUTCRequiredTimeOffset()) + "\n" +
"First Bar: " + ToString(session.from) + "\n" +
"Last Bar: " + ToString(session.to) + "\n";
LogAlert(msg);
} }
// //