As you can hopefully see in the attachment this is the Seasonal for a Day with M1 resolution.
Code:
#include <default.c>
#include <seasonal.c>
function run()
{
BarPeriod = 1;
StartDate = 2010;
EndDate = 2015;
set(PLOTNOW);
asset("EURUSD");
plotDay(priceClose(0),0);
PlotWidth = 1800;
PlotHeight1 = 500;
}
seasonal.c is a modified profile.c
i changed
function plotSeason(
int n, // plotted bar number
int label, // bar label
int season, // season number
var value, // profit to plot
int type) // cumulative or difference
{
if(is(INITRUN) || !is(TESTMODE)) return; // [Test] only
static int lastseason = 0;
static var value0 = 0;
if(!(type&PVAL) && season != lastseason) {
value0 = value;
lastseason = season;
}
plotBar("Value",n,label,value-value0,NEW|AVG|BARS|LBL2,COLOR_AVG);
//plotBar("StdDev",n,0,(value-value0)/4,DEV|BARS,COLOR_DEV);
if(type&PDIFF) value0 = value;
}
I don' really understand whats happening here, just commented the StdDev plotting. Maybe there is still some unnecessary code within this?
And to get the M1 resolution i changed plotDay as well:
function plotDay(var value,int type)
{
int periods = 1440;
checkLookBack(periods);
int m30 = hour()*60 + minute();
if(m30 > periods) return;
plotSeason(m30,hour()*60+minute(),dow(),value,type);
}
I don't know what profile.c is doing, we used to create arrays for each day within mql5 and stored the price change to to opening of the day for all 1440 values and you have to fill small gaps of course. Then just add all days and divide through the number of days. This is on my symstem a matter of seconds if no other calculations (filters, indicators, ...) are involveld. But with Zorro for the sample above it takes more then 1 min for me, and it is bugged...