You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
read this code & u will get the idea
Pardon me qjol for my ignorance. But I cant figure out how to put it together. I attempted here but it doesn't display anything so I think I crumbled it up. Kindly help out how to assemble it together in the proper order. Thanks.
double Cnt;
ExtMACOBuffer[i] = Crosses()/InpMACOPeriod;
B.T.W i don't get it y divide by 14
or maybe u mean the average crosses in 14 bars then you have to use iMAOnArray() function
input double InpMACOPeriod=14; // Period
double Cnt;
ExtMACOBuffer[i] = Crosses()/InpMACOPeriod;
B.T.W i don't get it y divide by 14
or maybe u mean the average crosses in 14 bars then you have to use iMAOnArray() function
Hi, I tried to use iMAOnArray() per attached codes and noticed the following:
1. Every 6 bars the indicator resets back to zero: I like the indicator to continue the line without it touching the zero again unless there is no count. The count must reset every bar but the number of count per bar must be added into the array ensuring and be averaged by the period.
2. The count is counting the ticks: I would like the indicator to count the crossings of MA with Open[0].
I attached the graph and the latest codes here. Please let me know how I can code correctly.
i realy dont get it
do u need the average of 14 periods crosses ?
i.e. Bar[0] bid crossed the Open[0] 14 times
+ Bar[1] bid crossed the Open[1] 16 times
+ Bar[2] bid crossed the Open[2] 8 times
+ ...
+ ...
+ Bar[13] bid crossed the Open[13] 7 times
Equal let's say 154
then 154 / 14 ?
do i understand correctly ?
i realy dont get it
do u need the average of 14 periods crosses ?
i.e. Bar[0] bid crossed the Open[0] 14 times
+ Bar[1] bid crossed the Open[1] 16 times
+ Bar[2] bid crossed the Open[2] 8 times
+ ...
+ ...
+ Bar[13] bid crossed the Open[13] 7 times
Equal let's say 154
then 154 / 14 ?
do i understand correctly ?
Yes you are correct. Remember that the 14 is a period input so I can change it to any value thus averaging the counts based on the period. The biggest head ache of this indicator code now is it is only counting the every ticks, that is not what this indicator for. I need it to count the number of cross over of price with Open[0] or how many times it pass the Open[] up or down. I noticed that if I use the Open[0]==Bid statement it still counts not this statement but the every ticks, the same thing with the MA crossing with Open[0] also counting the every ticks. Dont know why it is doing that. But I think we are very close to a solution from where I began.
now for the million dollar question, what is it worth without saving those data, because if you restart the indicator (the computer or the terminal) for any reason (even if you change the time frame) you gonna lose all those data
(it's not stored in some physically place it's stored in the memory(array))
once you have to restart, those data is gone
now for the million dollar question, what is it worth without saving those data, because if you restart the indicator (the computer or the terminal) for any reason (even if you change the time frame) you gonna lose all those data
(it's not stored in some physically place it's stored in the memory(array))
once you have to restart, those data is gone
Big big thanks Qjol. I compiled your code but received 1 error and 3 warnings that I copy paste here. Kindly fine tune it so I can compile. So excited to see it running. Yes I understand about the data loss issue. I need to run it for a few hours to gather enough info on the chart useful for my EA.