mila.com: Hello, can you help me please? I want to build 5 lines down from the close of the first bar in 50 pips increments. I have no idea how to do it with a cycle.
//+------------------------------------------------------------------+double price_close=iClose(Symbol(),PERIOD_CURRENT,1);
for(int i=1; i<=5; i++){ // цикл по количеству линийint shift=i*50; // смещение очередной линии относительно цены Closedouble price_line=price_close-shift*Point(); // Значение цены очередной линии
}
//+------------------------------------------------------------------+
mila.com: Thanks, Artyom, could you tell me how to get the opening price for 2016 or the current year or, for example, 2012?
intCopyOpen(
string symbol_name, // имя символаENUM_TIMEFRAMES timeframe, // периодdatetime start_time, // с какой датыint count, // сколько копируемdouble open_array[] // массив для копирования цен открытия
);
You need to put the date of the desired year here.
Well, you see that Vitya (Vinin) took a look, corrected and posted the corrected version without any extra words or show-offs.
But if I had deleted it, so what? The man would have been left without help.
Then he wouldn't have had to repeat it a third time. And Victor could have done the same thing a little later. But that's just my opinion, a reaction to public contempt. That's how I view the posting of such scrips.
Hello, can you help me please?
I want to build 5 lines down from the close of the first bar in 50 pips increments. I have no idea how to do it with a cycle.
I told you already - attach the code using the SRC button. I'm sorry, are you completely unlearned?
Tell me, who would want to look at this piece of junk?
Artyom, in my opinion such posts should simply be deleted without explanation.
Artem, in my opinion such posts should simply be deleted without explanation.
Well, you can see that Vitya (Vinin) took a look, corrected and posted the corrected version without any extra words or show-offs.
But if I had deleted it, so what? The person would be left without help.
Thanks, Artyom, could you tell me how to get the opening price for 2016 or the current year or, for example, 2012?
You need to put the date of the desired year here.
Well, you see that Vitya (Vinin) took a look, corrected and posted the corrected version without any extra words or show-offs.
But if I had deleted it, so what? The man would have been left without help.
This is where you should put the date of the desired year.
It needs to get the start date of the year. And you suggest to insert already found date to CopyOpen()
Thank you, Artyom, tell me how to get the opening price of 2016 or the current year or, for example, 2012.
Well, there is a function that converts any date you pass to it to the opening date of the date you passed to the function:
And what date and how you will pass there ...She needs to get the start date of the year. And you suggest to paste already found date into CopyOpen()
It's strange... Yesterday I could read and today I can't...
Forum on trading, automated trading systems & strategy testing
Any questions for newbies on MQL4, help and discussion on algorithms and codes
mila.com, 2017.09.06 08:39
Thanks, Artyom, advise how to get the opening price of 2016 or current year or for example 2012It's strange... Yesterday I could read and today I can't...
Well then - I can't read - something of my own making up ;)