No waiting for next 'tick'?
int start(){ while(!IsStopped()){ RefreshRates(); ...// everything else goes here. Sleep(1000); } // while return(0); }Can't be an indicator as they can not sleep.
Can't be an indicator as they can not sleep.
thanks for this - I did try this in an indicator and as you say it doesn't work. I guess there is no solution for an indicator then?
Also, I guess it is not possible to do anything in code with cursor/crosshair data in EA, indicator etc;??
thanks
Also, I guess it is not possible to do anything in code with cursor/crosshair data in EA, indicator etc;??
Don't the cross hairs do this for you or do you want to do something more complex than just get a price from a chart?
Look for:
void start() if(Volume[0]>0)return(0); //<----remove this line
Don't the cross hairs do this for you or do you want to do something more complex than just get a price from a chart?
yes, I want to be able to determine s/r levels dynamically by using the price values given by the crosshairs. So if I can utilise the price values from the cross hairs in code then this would be the ultimate solution.
Look for:
please can you expand further - I don't have his code in my routine, should I include the void start() block?
please can you expand further - I don't have his code in my routine, should I include the void start() block?
Hi All,
Does anybody know how to code an EA, custom indicator etc; to be able to run a sequence without having to wait for the next 'tick' in start()?
In its' simplest form let's say a horizontal line was added to a chart - grab the line and move it up and down the chart and produce an instant readout of price by using a 'label' or 'comment'.
This is easy enough with some code in start() but with infrequent 'ticks' there is a wait period before the price value can be obtained. How can it be done dynamically??
thanks