|
|
@@ -36,6 +36,8 @@ input string startMin = "59";
|
|
36
|
36
|
input string endHour = "00"; // End Hour
|
|
37
|
37
|
input string endMin = "05"; // End Minutes
|
|
38
|
38
|
|
|
|
39
|
+datetime expiry=D'2025.05.30 12:30:27';
|
|
|
40
|
+
|
|
39
|
41
|
// Structure to hold volume profile data for a day
|
|
40
|
42
|
struct VolumeProfileData
|
|
41
|
43
|
{
|
|
|
@@ -72,6 +74,12 @@ int OnInit()
|
|
72
|
74
|
// Set up FVG object prefix
|
|
73
|
75
|
prefix = "VProfFVG_";
|
|
74
|
76
|
|
|
|
77
|
+ if(TimeCurrent()>expiry)
|
|
|
78
|
+ {
|
|
|
79
|
+ Comment("Inactive. Contact Provider to Activate");
|
|
|
80
|
+ ExpertRemove();
|
|
|
81
|
+ return(INIT_FAILED);
|
|
|
82
|
+ }
|
|
75
|
83
|
// Initialize profile storage
|
|
76
|
84
|
ArrayResize(g_Profiles, MaxDaysBack);
|
|
77
|
85
|
for(int i = 0; i < MaxDaysBack; i++)
|
|
|
@@ -181,10 +189,13 @@ int OnCalculate(const int rates_total,
|
|
181
|
189
|
// Check if it's near the 23:59 boundary (update a bit before and after)
|
|
182
|
190
|
if((mdt.hour == (int)startHour && mdt.min >= (int)startMin) || (mdt.hour == (int)endHour && mdt.min <= (int)endMin))
|
|
183
|
191
|
{
|
|
184
|
|
- if(lastCandleTime != iTime(Symbol(),PERIOD_CURRENT,0))
|
|
|
192
|
+ if(lastCandleTime != iTime(Symbol(),PERIOD_D1,0))
|
|
185
|
193
|
{
|
|
186
|
|
- CalculateAllVolumeProfiles();
|
|
187
|
|
- lastCandleTime = iTime(Symbol(),PERIOD_CURRENT,0);
|
|
|
194
|
+ //if(newDayBar())
|
|
|
195
|
+ {
|
|
|
196
|
+ CalculateAllVolumeProfiles();
|
|
|
197
|
+ lastCandleTime = iTime(Symbol(),PERIOD_D1,0);
|
|
|
198
|
+ }
|
|
188
|
199
|
}
|
|
189
|
200
|
}
|
|
190
|
201
|
// Detect Fair Value Gaps if enabled
|