Download MetaTrader 5

Trouble in printing the line in last say 50 bars

To add comments, please log in or register
ankityadav
208
ankityadav  
Hi,Can somebody help me in prinitng the lines on last 50 bar??
Alain Verleyen
Moderator
33627
Alain Verleyen  
ankityadav:
Hi,Can somebody help me in prinitng the lines on last 50 bar??

What does that means ? Which lines ?

Alain Verleyen
Moderator
33627
Alain Verleyen  
ankityadav:

Hi thanks for your reply,Horizontal lines if you see the image there are lots of lines so i want filter out and make it through lets say for fifty bars so what i want to print the lines on the given bar criteria through code

What you asked for is very unclear to me. How are these lines drawn ? You "want to print the lines" you mean the chart or the values ? How an horizontal line is related to a given bar ?
Alain Verleyen
Moderator
33627
Alain Verleyen  
ankityadav:
Please read the code i have make a certain condition to draw this line.But the area is surrounded by so many lines so i want to put filter in that to use bars filter if there are 100 bars available then i have to see the lines in only 50 bars that was i m doing but its nt working can you help me to do that

Change the value of limit to use MAX_BARS instead of Bars, something like :

  MAX_BARS=50;
  ...
  limit=MAX_BARS-counted_bars-1;
ankityadav
208
ankityadav  
But if you see i m printing the line fast and slow band as well so i want to print them from the start Is that possible??
Alain Verleyen
Moderator
33627
Alain Verleyen  
ankityadav:
But if you see i m printing the line fast and slow band as well so i want to print them from the start Is that possible??

Yes, only print them if limit is <=50.
ankityadav
208
ankityadav  
Yes It does work Thanks for your help and very very thankful to you
ankityadav
208
ankityadav  
Hi its working fine one thing i would like to as you if i want to print lines say 30 pips away from the market value for that what i have used as i already used market info function Can you help me
To add comments, please log in or register