[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 25
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Everybody was a dummy )))
This is actually what I have encountered. The maximal period by constants is PERIOD_MN1 or 43200.
How should I calculate the difference between Hi and Low for the current currency pair from the beginning of the quarter and year?
I'm trying to do it the dumb way, but it doesn't work...
May be, what function should be written? Help, please...
Dear Sirs, I can't find a muwinking indicator with high timeframe, there is only one 'MA-4H'
But it has a disadvantage - it lacks set price types, how can I add HIGH and LOW?
Maybe a function needs to be written? Help, please...
Here's an example of the maximum for a year... I think the principle is clear.
>> thank you. I'll give it a try... But it's for the previous full 12 months from the current day, right? How do I get it to be calculated from the beginning of the current year only?
the value that is placed in the buffer, by which the histogram is drawn
Another question about the value the indicator will pass to the Expert Advisor through iCustom.
What if there is a condition in the indicator itself:
If one variable is larger than the other, the histogram is red, otherwise it is blue.
What value will it pass to the Expert Advisor and is there a possibility to make it pass 1 for a red histogram and -1 for a blue one?
Question #2:
I often see Return (0); and Return (-1); how it is used in practice and why I don't understand it(( please advise, please.
Thanks... I'll give it a try... But that's for the previous full 12 months from the current day, right? How do I get it to be calculated from the beginning of the current year only?
Calculate bar number of the year beginning(iBarShift will help us) and substitute it instead of 0.
Question #2:
I often see Return (0); and Return (-1); in code how it is used in practice and why I can't figure it out(( please advise, please.
This is a simple value returned by the function but if it is not handled you may return anything you like, just return;
It's just a value returned by the function, if it's not handled, you can return anything, even just return;
I understand now. Thank you.
Could you advise on the first question: I am writing an Expert Advisor that works with the indicator (via iCustom.
The histograms are drawn in the indicator itself (as bars) and they are drawn by a condition:
If one variable (which is calculated from the bar prices) is bigger than the other, then a red histogram is drawn, otherwise a blue one.
Which value it will pass to the Expert Advisor and is there a possibility to make it pass 1 for red histogram and -1 for blue?
If one variable (which is calculated from bar prices) is greater than the other, then it draws a red histogram, otherwise a blue one.
Which value it will pass to the Expert Advisor and Is there any way to make it send value 1 in case of red histogram and -1 in case of blue one?
You will answer your own question if you realise that each buffer being drawn has one different colour. The two-coloured line you see on the graph is actually drawn with two buffers. At times when it is red, the "red" buffer is equal to the value of the line, and the "blue" buffer is 0 (or EmptyValue). And vice versa. Consequently, you have to take two iCustom, for two buffers.
What is the logic inside the indicator, the output buffers don't give a shit. You work like with a black box.
Calculate the number of the bar at the beginning of the year(iBarShift to help) and substitute it for 0.
What am I doing wrong?