작업 종료됨
명시
Hi experts, hope you can help me with little statistical analysis of behaviour of traders dependent from things like "trading day" or "trading hour" ... :)
Thanks a lot in previous!
I dont have much time, so i look only at weekend in here.
This will be later add as specification:
You can do this as function for an existing MT4-EA:
Statistical analysis: for example, if fist trading mondays (day/hour) are more positive/negative price movement than last trading day (friday) and results to csv-file or to console.
Examples
- Average price movement of all Mondays(day of week) when a year(tf) ended positive/negative/greater>0.5% (some condition)
- Average price movement of a specific hour of a day (9:00-9:59) if the day ended more than between +0.5% and +1.0%.
- Average price movement of month september, if the current (previous) year ended positive/negative...
Suggestion (if you dont have better idea how to do the job):
make array for each tf, than loop all trough to be able to have all data which is necessary for current bar (all TFs) for example to be able to decide if current day/year/... will end positive or negative (see below "condition").
Further suggestions:
* params description:
* sum_tf: if sum_tf = 60= 1hour, you count the price movemant for one hour (for example from 8:00 to 8:59)
* count_tf: if "day" and position=1 you sum the price movement of the first trading hour per day
* position: 1=first hour of day or first day of week. Or same described with parameters: 1=first [sum_tf] of [count_tf]
* count: how many bars of calc_tf
* condition: For each sum check condition:if condition is "true" sum price (for Average calc) else dont sum
* if you dont know with objects, you can replace "condition con" by some parameters (see below at explanation of condition)
double sum_average( int sum_tf, int count_tf, int position, int count, int shift, condition con)
{
* example: sum_tf=60=1hour;count_tf=day, position=1
* Price Movements for the last
for( alle count_tf from shift to count )
{
for( i=1;i++; )// alle sum_tf (in this count_tf)
{
if( con.check(count_tf) )
if(i=position) sum= sum + iClose(NULL,sum_tf,i)-iClose(NULL,sum_tf,i-1);
}
}
sum=sum/count;
*write sum to file or console;
return(sum);
}
condition:
- checks result of movment of the current "count_tf" with parameter "percentual periodas from-to"
bool con.check( int tf, int shift, double from, double to)
{
* example:
* tf = 1 day (=count_tf)
* shift = 0
* from = 0.5
* to = 1.0
if( price_movement_of_current_day > +0.5% and less than +1.0%) return(true);
else return(false);
}