eddy: Average profit means the arithmetic average of the profits on all first 5 minutes of all available days in the history.)
So, the 5 minute candlestick has the opening price, closing price, min/max and volume, all other candlesticks have the same volume, so what kind of profit are we talking about?
Log is a file :) open it with a simple editor and watch...
The second option - write an indicator (advisor) that will write to another file the data you need - for a period, in the loop - even in several files....
So it should be written to a file that can be read, although not necessarily with files, but you need to remember every five minutes of the entire available five minute history in order to find the average.
What's not clear? I'm all over it.
Average profit means the arithmetic average of the profits on all first 5 minutes of all available days in the history.)
although true, you don't need it :D
You need to know the maximal price movement within the period, i.e. MathMax (Low[iLowest], High[iHighest] - Open 5 min.)
and then find
the average stroke of the first 5 minutes,
the average stroke of the second 5 minutes and the other 5 minutes of the day,
average stroke of 10 minutes, shorter than n minutes, n = 5 to 120 minutes in increments of 5
Log is a file :) open it with a simple editor and watch...
The second option - write an indicator (advisor) that will write to another file the data you need - for a period, in the loop - even in several files....
Why? You want to know the average for the day, don't you? (By the way, why don't you consider Hi-Lo 5 minutes?
Get an array of values :)
288 5 minutes a day,
144 10 minutes.
etc... Put the data in and calculate the average - then output all arrays in Deinit and look at the data :)