Please help with Gann Square of Nine Grid - page 2 12 New comment Mohammad Al turk 2012.09.19 09:54 #11 deVries: I tested the code of Tasleem it is working Could you please attach the indicator which works with you Ickyrus 2012.09.19 11:45 #12 turkm: check this version of the indicator nowwww it works very fine thanks to all of you. Nice editing. Tjipke de Vries 2012.09.19 12:04 #13 turkm: Could you please attach the indicator which works with you Files: gann_square_of_nine_grid.mq4 11 kb Mohammad Al turk 2012.09.19 19:28 #14 deVries: Its work very well now, but why i cant get the coordinates of element when i look for it in array, if you have a moment please take a look to your version which i made some changes with it at these function: void search(double num) { int num_1=number_1 / point; for(int x_1=0; x_1<=n; x_1++) { for(int y_1=0; y_1<=n; y_1++) { if (a[x_1][y_1] == (number_1 / point)) { array_x=x_1; array_y=y_1; //break;break;break; } } } Comment(array_x," ",array_y," ",number_1 / point," ",num_1); } Files: squareynineb5.mq4 12 kb Enabling the Storage - Articles on the development Indicators - Chart - Tjipke de Vries 2012.09.20 03:42 #15 here is the program with the change don't search for double value if you still have integers in the array in journal experts you will read the value if n is chosen not too big you can check easily if the function is working correctly void SearchRoutine(int number) { int i, j,x,y; for (i = n; i >= 0; i--) { j = 0; for (j = n; j >= 0; j--) { if(a[i][j] == number) { y=i;x=j;i=0;j=0;//y vertical row x horizontal col y Print("a[",x,"][",y,"] = ",number); } } } return; } Files: square_nine_6.mq4 12 kb Migration - Virtual Hosting Working with SQL data Task Manager - For Mohammad Al turk 2012.09.20 08:48 #16 deVries: here is the program with the change don't search for double value if you still have integers in the array in journal experts you will read the value if n is chosen not too big you can check easily if the function is working correctly thank you very much, its helping me a lot. Tjipke de Vries 2012.09.20 10:57 #17 There is more to improve counting row && colom from zero to n-1 with n=1 only 1 row 1 colom n=2 2 row 2 colom max fill 4 change Gann() void Gann() { int row, col, r, c, fill=0, m=1; //Centre point row = n/2; col=row; //Clockwise Spiral Begin fill++; a[row][col]=fill; //move left fill++; col--; a[row][col] = fill; while((m<=n)&&(fill<n*n)){ m += 2; //move up for(r=1; r<=(m-2); r++){if(fill<n*n){fill++; row--; a[row][col]= fill;}} //move right for(c=1; c<=(m-1); c++){if(fill<n*n){fill++; col++; a[row][col]= fill;}} //move down for(r=1; r<=(m-1); r++){if(fill<n*n){fill++; row++; a[row][col]= fill;}} //move left for(c=1; c<=m; c++){if(fill<n*n){fill++; col--; a[row][col]=fill;}} } } Files: square_nine_7.mq4 12 kb Mohammad Al turk 2012.09.20 12:12 #18 deVries: There is more to improve counting row && colom from zero to n-1 with n=1 only 1 row 1 colom n=2 2 row 2 colom max fill 4 change Gann() Really many thanks, its works fine. [Deleted] 2012.10.15 18:54 #19 how is this stuff use turkm. i mean the squareu ninel. is it a trad indicator? 12 New comment
I tested the code of Tasleem it is working
Could you please attach the indicator which works with you
turkm:
check this version of the indicator nowwww it works very fine thanks to all of you.
Could you please attach the indicator which works with you
Its work very well now, but why i cant get the coordinates of element when i look for it in array, if you have a moment please take a look to your version which i made some changes with it at these function:
here is the program with the change
don't search for double value if you still have integers in the array
in journal experts you will read the value if n is chosen not too big you can check easily if the function is working correctly
here is the program with the change
don't search for double value if you still have integers in the array
in journal experts you will read the value if n is chosen not too big you can check easily if the function is working correctly
There is more to improve
counting row && colom from zero to n-1 with n=1 only 1 row 1 colom
n=2 2 row 2 colom max fill 4
change Gann()
There is more to improve
counting row && colom from zero to n-1 with n=1 only 1 row 1 colom
n=2 2 row 2 colom max fill 4
change Gann()
Really many thanks, its works fine.