Dear Forum,
first let me explain what I'm trying to do.
Basically you can define every candleshape with 2 Parameters.
Let's define High-Low of any Bar as 100%.The candle Opens at 0% (the Bottom) and closes at 100% (the Top) you have a strong bullish bar without any wicks. If you look at a 0/5 Bar it will be a Pinbar with 95% of the candle beeing the upwick.
Since both parameters range from 0 to 100% you get 10.000 different candle types. To find out if there is any predictive value in some Bars you look for a bar defined by X/Y and measure the result (Price Difference) after x Bars with: Close[i](our "Signal Bar")-Close[i-shift](the "Result Bar")/Point which gives you the distance traveled in Pips. If the same Bar occurs again -> record the Result.
I tried to do this with a 3 dimensional Array
[Open Percentage][Close Percentage][Result] but it didn't really work.
All output files just contained 0 so I tried another approach. Now my 3rd Dimension only uses the first index [0] but as a string array so we simply add the 2nd Result to the last one and seperate them with ;. Now the only thing I have to do is take 2 for loops (0->100 first dimension 0->100 second dimension ) to read every result which does work but every file contains the same line over and over again. Also the Script records roughly 14K results in a single line which doesn't make sense because that would mean that almost all of my Bars in my History (~15k Bars) fall in the same category (out of 10k available). I assume that the script took the result of every bar and placed it in the same array which I absolutely don't understand why.
I added a function which will print the results (as much as MT4 can handle) in the Experts Tab and everything seems to work well, but it doesn't.
Be carefull the script writes about 2 Gigs of Data for 15k Bars into 10.000 Files and take a few minues to excecute.
You could easily change this to make a file for every OpenPercentage and all 100 of its ClosePercentages (one row for every ClosePercentage) this would reduce the files to 100 but will result in bigger files.
Could anyone take a look at in and get that damn thing to work?
first let me explain what I'm trying to do.
Basically you can define every candleshape with 2 Parameters.
Let's define High-Low of any Bar as 100%.The candle Opens at 0% (the Bottom) and closes at 100% (the Top) you have a strong bullish bar without any wicks. If you look at a 0/5 Bar it will be a Pinbar with 95% of the candle beeing the upwick.
Since both parameters range from 0 to 100% you get 10.000 different candle types. To find out if there is any predictive value in some Bars you look for a bar defined by X/Y and measure the result (Price Difference) after x Bars with: Close[i](our "Signal Bar")-Close[i-shift](the "Result Bar")/Point which gives you the distance traveled in Pips. If the same Bar occurs again -> record the Result.
I tried to do this with a 3 dimensional Array
[Open Percentage][Close Percentage][Result] but it didn't really work.
All output files just contained 0 so I tried another approach. Now my 3rd Dimension only uses the first index [0] but as a string array so we simply add the 2nd Result to the last one and seperate them with ;. Now the only thing I have to do is take 2 for loops (0->100 first dimension 0->100 second dimension ) to read every result which does work but every file contains the same line over and over again. Also the Script records roughly 14K results in a single line which doesn't make sense because that would mean that almost all of my Bars in my History (~15k Bars) fall in the same category (out of 10k available). I assume that the script took the result of every bar and placed it in the same array which I absolutely don't understand why.
I added a function which will print the results (as much as MT4 can handle) in the Experts Tab and everything seems to work well, but it doesn't.
Be carefull the script writes about 2 Gigs of Data for 15k Bars into 10.000 Files and take a few minues to excecute.
You could easily change this to make a file for every OpenPercentage and all 100 of its ClosePercentages (one row for every ClosePercentage) this would reduce the files to 100 but will result in bigger files.
Could anyone take a look at in and get that damn thing to work?
Attached File(s)
CandleStats.mq4
3 KB
|
436 downloads