Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 979
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
Continuing the conversation... As I understand it, the assignment can be reduced to the following. To simplify, we will only examine yesterday's day, H1 period.
First, we look for the earliest candle (looking from the left side of the yesterday's chart) the Close of which is higher than the Open, i.e. we look for the first bullish candle. If this one is found, then starting from it (including it) to the latest candle of the current day, we should find the candle with the highest High. E.g., if the opening time of the first bullish candle is 10:00, then from it till the 23:00 candle we should look for the candle with the highest High. Right?
Oh, thank goodness... I'm understood! YES! YES! YES! That's exactly what I'm trying to do. If you know, can you tell me how to do it?
Oh, thank goodness... I got it! YES! YES! YES! That's exactly what I'm trying to do. If you know, can you tell me how to do it?
If it is yesterday's candlestick, it will be the end candlestick in iHigest(), and the start candlestick will be 00:00 of the next day (i.e. today's candlestick) obtained from iBarShift().
Example algorithm:
1. Today we are looking for the first bull bar among yesterday's hour bars. Let it be the endBar index
Determine the first one-hour bar today. Or it will be zero.
3. In iHighest() set the penultimate parameter as endBar (or endBar +1 should be precise), and the last one as 1.
The sought result is High[iHighest(with relevant parameters)] // Or the corresponding variable, the value of which was assigned in the previous clause.
Oh, thank goodness... I'm understood! YES! YES! YES! That's exactly what I'm trying to do. If you know, can you tell me how to do it?
SCREPT! trying.
r772ra Thank you very much!!! The script does what I need!!! Not everything is clear to me in the last block of code, but I'll figure it out. I will figure it out. I will try to use it in indicator.
Iwill try to use it in an indicator:
If you have any questions in the future, please put them in a way that makes it easier for the programmers to understand.I got it, I will take it into account!
Thank you very much!
r772ra Thank you very much!!! The script does what I need!!! Not everything is clear to me in the last block of code, but I'll figure it out. I will figure it out. I will try to apply it to indicator.
All right, I will take it into account!
Thank you very much!
Exactly what is not clear?
Explain if I'm wrong, I think the second half of the script code _"void SetArrow(int cd, color cl," is the part that refers to the"_OnInit()" function in the indicator.. indicator, and the first part of the script _"void OnStart()" refers to the function "_OnCalculate" in the indicator? I mean, roughly speaking, the script has 1) calculation at first and then 2) initialization only. In the indicator it is vice versa.
Explain if I'm wrong, I think the second half of the script code _"void SetArrow(int cd, color cl," is the part that refers to the"_OnInit()" function in the custom indicator.. indicator, and the first part of the script _"void OnStart()" refers to the function "_OnCalculate" in the indicator? I mean, roughly speaking, the script has 1) calculation at first and then 2) initialization only. In the indicator it is vice versa.
It is a user-defined function that is outside the scope of other functions.
Functioncall, from any other function
I think you don't need it in the indicator, the buffer is responsible for the drawing
In other words.
Further
The function
And the call
find the number of bars from the beginning of the day (the current day is not recalculated) and that bar goes into the history.
Addendum))) the functions are taken from here
Wow, that's a lot to chew on:) ...As they say, -No more questions -no more questions!
THANK YOU!!!