EA number of bars changes when chart is in background

Post Reply
jeb33red
Posts: 2
Joined: Thu Jun 07, 2012 11:21 am

EA number of bars changes when chart is in background

Post by jeb33red »

Hi

I have noticed that when I run a number of charts at once - the charts in the background bars are reduced.

An example is running a 4hour chart in the foreground I get a count of 289 bars - when I use the WindowBarsPerChart() function in an EA.

However the same code returns 77 bars when another chart is in front of this.

My initial work around was to zoom out the chart to display more bars - however this affects the calculations so back to the drawing board!

Does anyone know how to force Empty4/EA to make the bars in the chart continue as if the chart was in the front or any other workaround such as virtual maximising the background chart windows?


Regards

jeb
jeb33red
Posts: 2
Joined: Thu Jun 07, 2012 11:21 am

Re: EA number of bars changes when chart is in background

Post by jeb33red »

Hi

Solved it - using ibars functionality.

Regards

jeb
Post Reply

Return to “Coders Hangout”