[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 259

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
no
Something is wrong in this piece of code, and I don't know what it is.
Sincerely.
>> help!
THANK A HUGE THANK YOU I would never have found iCustom in>> MQL4 Reference - Technical Indicators - iCustom (searched elsewhere, but not here)
Thanks a HUGE THANK YOU again!
Greetings!
I am trying to teach MT4 to identify the bars which range exceeds ATR(60) on the chart:
extern inttern Quant_Bars=1000; // Number of bars
int start()
{
int Ind_Bar;
for(Ind_Bar=Quant_Bars-1; Ind_Bar>=0; Ind_Bar--)
{
Create(Ind_Bar);
}
return;
}
//--------------------------------------------------------------- 3 --
int Create(int Ind_Bar) // User-defined function to create an object
{
Color Color=Red; //Object colour
datetime T_Bar=Time [Ind_Bar]; // Bar open time
double O_Bar=Open [Ind_Bar]; // Bar open price
double C_Bar=Close[Ind_Bar]; // Closing price of a bar
double H_Bar=High [Ind_Bar]; // Bar maximum price
double L_Bar=Low [Ind_Bar]; // Minimum bar price
double A= iATR(Symbol(),0,60,Ind_Bar);
if((H_Bar-L_Bar)>A)
ObjectCreate("His_Name",OBJ_TREND,0,T_Bar,H_Bar,T_Bar,L_Bar);
return;
}
... For some reason, it fills only one bar (the first one on the left, in my opinion), although I should have it all within 1000-0 bars. Please advise where the error is?
I can't figure out where to connect the brackets...help me please!
=>
I can't figure out where to put the brackets...help me please!
=>It's not two brackets that are missing, there is no structure at all:
and then put the right conditions and operators into the structure.
pppppppp
It's not two brackets that are missing, there is no structure at all:
and then add the required conditions and operators to the structure.
pppppppp
It doesn't work like that.
What should I do correctly for my case?
Hello. Please help me to redo the Period Converter Opt.
Here's the gist of it.
For example, we form 8 hour bars (terminal time) from 1 hour bars. We get the series: 0, 8, 16, 0 hours, etc.
I would like to be able to set an offset in the Converter. This shift can be done in the number of bars of the TF on the basis of which the required one is formed. If it is formed on the basis of 1-hour, then the shift will be expressed in hours... If it is formed on the basis of 15-minute, then the shift will be 15, 30, 45 minutes....
In addition, the time in the terminal also differs from "my" time by 2 hours. => inconvenient to go to the terminal at 2am MSC.
So, when forming the 8-hour timeframe with an offset of +3 (for example) we will get a new series: 3, 11, 19, 3, etc. Or (-2) offset will give: 22, 6, 14, 22, etc. Although it may be possible to limit it to the plus
offset.
The purpose of the offset is to prevent the bar from forming completely during the trader's sleep period.
This is how I would like to refine Period Converter Opt.