hi all,
need some help here ... am trying to make a script that can check the moving average value.
so far i have that done but its just that the value does not refresh.
so i was trying to loop the thing so that it will be refresh.
i tried using a while loop but it seems that the refreshing is too fast and the value started flicking and my CPU usage is almost 100%.
i tried searching the forums and seen some examples and none of them uses while loop to loop thru the script.
tried them but all fails, plus i realised that the value of the moving average will only change when a new bar appears.
so this is what i tried but fail ... could someone enlighten me on this???
void start()
{
if(Volume[0]>1) return;
/*body of program*/
}
is this correct?
Write an EA, and use Alert function, when your MAs cross.
We are not clear whether you have used a Script (used for a single action or list of actions)
Or your script (i.e. code) is in an Expert Adviser.
The current value of the Moving Average will be changing as the curent price moves
If you need a fixed value check it (with a Shift of 1) on the first tick of the new bar
Good Luck
-BB-
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi all,
need some help here ... am trying to make a script that can check the moving average value.
so far i have that done but its just that the value does not refresh.
so i was trying to loop the thing so that it will be refresh.
i tried using a while loop but it seems that the refreshing is too fast and the value started flicking and my CPU usage is almost 100%.
i tried searching the forums and seen some examples and none of them uses while loop to loop thru the script.
tried them but all fails, plus i realised that the value of the moving average will only change when a new bar appears.
so this is what i tried but fail ... could someone enlighten me on this???
void start()
{
if(Volume[0]>1) return;
/*body of program*/
}
is this correct?