Off-topic posts - page 54

 
I honestly feel as if some of the things and services we pay for especially on freelance should have a higher degree of flexibility when it comes to price. For example paying 30 USD for fixing 3 lines of code sounds a bit of to me.
 
 
Blue Bison #: For example paying 30 USD for fixing 3 lines of code sounds a bit of to me.

Then learn to code.

MT4: Learn to code it.
MT5: Begin learning to code it.

If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

 

how can I get the total number of bars visible in the chart?

Bars(_Symbol, _Period) does not work as it tells the total number of bars in history

 
douglas14 #:

how can I get the total number of bars visible in the chart?

Bars(_Symbol, _Period) does not work as it tells the total number of bars in history

Sorry guys, already found the solution.. I used:

ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0)

 
douglas14 #: ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR,0)
Chart Price Max/Min - MQL4 programming forum (2017)
 

*********
 
I just newly registered a demo account of MT5 with <Deleted>. I tried out one of the simplest indicator creation but the buffer is always storing the 'ZERO' value. Appreciate someone can help me !
Files:
fig1.png  222 kb
fig2.png  230 kb
fig3.png  258 kb
 
cheechochoy #:
I just newly registered a demo account of MT5 with <Deleted>. I tried out one of the simplest indicator creation but the buffer is always storing the 'ZERO' value. Appreciate someone can help me !

i am not a pro coder, however, if you dont want the 0 to be stored, shouldnt your "for" line be this? Try it anyway.

   int pos=prev_calculated-1;
   for(i=pos; i<rates_total && !IsStopped(); i++)
 
Hi Revo T, thanks for yr reply. 

Drawing Indicators With SetIndexBuffer()

Actually I followed this simplest tutorial by JiimDandy 1958. I suspect something is not right with the data at my end.