dimanche 19 avril 2015

Quick Programming question

Hi All,



I'm stuck on a particular programming problem and would welcome any advice.



When I drop my EA on a chart, I want the EA to look back at previous bars (based on a particular timeframe) and count how may bars have passed since a particular event happened.



As an example, when I drop the EA on the chart (any timeframe) I want it to look back and count the number of daily bars that have occurred since the last gap up appeared on the daily chart. (ie where price opened higher that the previous bars close).



How would I go about doing this? I think this will need to be accomplished by using code containing a for-loop which would be placed under the OnInit() section of the EA??? but I'm not too sure...



Any advice/suggestions welcome....



Thanks in advance,



Chorlton

Quick Programming question

0 commentaires:

Enregistrer un commentaire