Codes

BarNumbers for MetaTrader 4

Displays the number of each bar - both, relative to the most current bar and in absolute terms from the beginning of the chart

Forum

Find bar of the same time one day ago

Hi guys, As described in the title, I want to find the bar of one day ago at exactly the same time. So e.g. the time now is 20:23 on the 06.10.2017 which is covered by the 20:20 M5-bar. I want to find the M5 that covers yesterday's (05.10.2017) period of 20:20. How would you do it? Thanks :)

Load bars in higher timeframe

Hi guys, So i wanted to use iBarShift to find out in a higher timeframe, which bar covers a specific time. But it does return -1 sometimes (i put false as the exact parameter ). My suspicion is that it does that because the bars are not yet initialized in the higher timeframe. Only when i enter that

How do I get the time that is most on the right of the chart?

Hi, How can I find out (programmaticaly) what the time is on the rightmost (not yet initialized) bar on the chart? For clarification: What is the time where the arrow is pointing? It's in the future obviously, but how much? I can't just add some time amount to the current bar time because this empty

Why does MT4 show bid prices instead of close?

Hi guys, The question is in the header. I thought the price was the last price where buyers and sellers met, more specifically, where bid and ask prices crossed over and a turnover of "shares" happened. Now in MT4 apparently those are the Bid prices. I understand that CFD's are not exactly shares

How do I lock pixel spacing between two textboxes?

Hi guys, This is a screenshot of the Monster Harmonic Indicator by Paul Geirnaerdt. I have 2 questions: 1) How can i fit two textboxes beneath a candle low so they don't squeeze together when i squeeze the chart together? This happens because the text is fixed to a price coordinate and when they

Place description text in the middle of line

Hi guys, So when I activate "show object description " in the chart settings, my lines will display a little text on top with the given desciption. Can i somehow change the alignement of these descriptions so that the text appears centered between start and endpoint of the line? Thanks! :)

Switching timeframes recalculates whole indicator even with IndicatorCounted()

Hi guys, So yeah, the question is in the title. I have an indicator which uses IndicatorCounted() to find out how many candles have not yet been calculated since "last time", but when i switch back and forth between two timeframes, IndicatorCounted() is always zero and thus the whole thing gets

Detect object under mouse

Hi again Is there a way to get the object(s) below the mouse cursor (or at a certain position x/y) ? I can't seem to find a function ... :/ Thanks! :)

How to not connect buffer lines between specific bars?

‌Hi guys ‌ So i have a Pivot Point indicator, and as you can see it always connects yesterdays PP / Support / Resistance levels with the ones of today with those steep lines: ‌ ‌I was wondering wheter it was possible to avoid this behavior and just NOT draw these connections? Can you somehow define

Distribute slow indicator calculation over mutliple frames

Hi guys, ‌ I‌ have an indicator which takes quite a long time to calculate. This is a problem when I try to switch quickly between periods as the chart is stuck as long as the calculation is ongoing. Now i want to spread out this slow calculation over multiple frames, so that i can still work with