if (bay_min == true) datetime T=Time[0] //сработал сигнал на покупку запоминаем время бараif(iBarShift(NULL,0,T)==2) //по времени, сигнал был на 2 баре
{
if (Open[1]<Close[1] && Open[2]<Close[2] ) //и эти бары бычьи
{
// что-то делаем
}
}
// я думаю, как-то так.
Thank you, the logic is clear, but it has stopped opening a trade altogether
проблема в этой строчке
if(iBarShift(NULL,0,T)==2) //по времени, сигнал был на 2 баре
Please advise. My ZigZag indicator is overdrawing. It draws a certain object on the chart. When price changes and it is necessary to delete the object, the object is deleted, but value of buffer in the chart is still. How to delete old value also, not only from chart? If you can code or show where it is implemented in the zigzag?
Dimka-novitsek: How do I teach the computer to perform strictly this task biz brakes? Otherwise, the speed tester lever only responds if it wants to! The delay is often 3-8 seconds. Mentioning all the bad women!
Dimka-novitsek: How do I teach the computer to perform this strictly business task biz brakes? Otherwise, the speed tester lever only responds if it wants to! The delay is often 3-8 seconds. Mentioning all the bad women!
I managed to create my own EA. I ran it with a fixed spread of 19. Since 2005. Always stop loss. Take always. It does not use averaging and martin. Positions are closed within the day, i.e. are not transferred to the next day.
Been away for a few days... I'm wondering - do the wizards thrown over the graph have the same parameters as the wizards used in the calculations? Maybe that's where the problem lies?
Of course, they have the same parameters. Here, in test mode, I opened the properties of a given MA.
artmedia70:
(I still had no time to delve into the code and take it apart).
It's all written very simply, so anyone can understand it at a glance :)
artmedia70:
I would make a function, for example:
//-----------------------------------------------------------------------------+ double ma(int MAperiod, int MAmethod, int MAshift) {return (iMA(Symbol(), Period(), MAperiod, 0, MAmethod, PRICE_OPEN,MAshift));} //-----------------------------------------------------------------------------+ and called it to get parameters
I was thinking about it initially when I wrote the whole Expert Advisor, not this one. BUT. iMA is already a function. Calling iMA function, you can enter any parameters, some with globally declared variables, and some by default, for example. The point is that what's the point of calling a function from a function if it doesn't make any sense?
but for the output, I understand that the printer only prints 4 or less digits.
then if Print (DoubleToStr(Startprice,5)); // print Startprice
it gives out 5.
But when you add a bar time
This line does not add the bar time?
if it's like this.
it's not working, it's blaming '=' - incompatible types C:\fortest\experts\sve.mq4 (34, 14)
How do I write it correctly?
Thanks for the reply, I've been working on it for a week already)
Try it like this:
but for the output, I understand that the printer only prints 4 or less digits.
then if Print (DoubleToStr(Startprice,5)); // print Startprice
it gives out 5.
But when you add a bar time
This line does not add the bar time?
Show how you got bay_min.
How do I teach the computer to perform strictly this task biz brakes? Otherwise, the speed tester lever only responds if it wants to! The delay is often 3-8 seconds. Mentioning all the bad women!
How do I teach the computer to perform this strictly business task biz brakes? Otherwise, the speed tester lever only responds if it wants to! The delay is often 3-8 seconds. Mentioning all the bad women!
Making the best of it
Strategy Tester Report
I managed to create my own EA. I ran it with a fixed spread of 19. Since 2005. Always stop loss. Take always. It does not use averaging and martin. Positions are closed within the day, i.e. are not transferred to the next day.
My programmer is lousy, to put it mildly.
Been away for a few days... I'm wondering - do the wizards thrown over the graph have the same parameters as the wizards used in the calculations? Maybe that's where the problem lies?
Of course, they have the same parameters. Here, in test mode, I opened the properties of a given MA.
(I still had no time to delve into the code and take it apart).
I would make a function, for example:
//-----------------------------------------------------------------------------+
double ma(int MAperiod, int MAmethod, int MAshift) {return (iMA(Symbol(), Period(), MAperiod, 0, MAmethod, PRICE_OPEN,MAshift));}
//-----------------------------------------------------------------------------+
and called it to get parameters