I was able to at least look at some variables whilst running VS (rather than using the more awkward output window /print functions in the local editor - and it all looked fine as I stepped through it. However, I would like to see things graphically as well, as I think that some instances are not being correctly picked up. So I want to draw a series of dots on the chart to indicate when various condition are met.
This would use the DawDot() function - which I have the details for. My problem is that I cant seem to invoke it for all the historical bars in the chart. I suppose this has something to do with the OnBarUpdate() method that I have put it in.
What I basically want is for it to run across all historical bars and plot values below the lows or above the highs of all historical bars in a series.
So something on the lines of
For each Bar in Historical Data
If (EMA(20) > EMA (200)) ;
{DrawDot(I understand all these parameters - and will offset each by 2 ticks, 4 ticks, 6 ticks etc from the lows or highs so the dots from differeing conditions will not overlap on each bar)}
If (MACD > 0));
DrawDot () etc
and so on until I graphically illustrate all instances of conditions being true on a chart. I can then look at the autogenerated buy or sell signals to see if they tally.
I know this seems a bit long winded but I think it may be useful for others as well in determining suitability of conditions - especially as I have had some problems on deciphering exactly which values are being used from the dataseries as on VS it says that the values might be stale (i presume this meant it might be some update problem....but after manually reading and storing the values out to double variables i found it was updating correctly - though for safety i kept using the variables in my conditional statements rather than the data series directly as they were continuously updating in debugging - whilst im still not sure about the series values directly.
Im sorry this post is so long - esp being my first. But I would like to thank all here as I have learnt a great deal from going through messages here.
Thsnks in advance.
Comment