An advisor that would follow the rate on a five-minute chart with conditions after launch: - page 3

 
Totally bored.......
 
int start()
{



//----
if(iOpen(NULL,5,0)-Bid>Delta*Point) //The price has fallen more than Delta points
{
// Trade actions
}
if (iOpen(NULL,5,0)-Bid<Delta*Point) //The price has risen more than Delta points
{
// Trade actions
}
//----
return(0);
}
You have to be careful with brackets.
and it's a good idea to understand what you are writing.
 
What to do with :

double iOpen( string symbol, int timeframe, int shift)
 
salesman77:
What to do with :



double iOpen( string symbol, int timeframe, int shift)


And what is this declaration, try to explain !!!!
 

When compiling, - the bottom window shows the errors. Click on the line with the error and a red dot will show you exactly where the error is in the code

 

One more thing. Let's say you need to know what a particular code element means. For example - iOpen. You highlight it with your mouse. You press F1 on your keyboard. - At the bottom of the box you will see a comprehensive reference to this element! With an example of how to use it!

 
Figar0:
salesman77:I don't get it, but I want to figure it all out.

I think you just need to start from here https://book.mql4.com/ru/ I sometimes read it myself, it's very useful.
You should not ignore my message to the textbook, you cannot quickly create a profitable Expert Advisor without understanding it. It was written specifically for those who "Can't understand it, but want to understand it. "
 
Figar0:
Figar0:
salesman77:I don't get it, but I want to figure it all out.

I think you just need to start from here https://book.mql4.com/ru/.I read it myself sometimes, very useful.
You should not ignore my message to the tutorial, you cannot quickly create a profitable Expert Advisor without understanding it. It was written specifically for those who "Can't understand it, but want to understand it. "
I don't ignore any of the advice. I save everything locally. I read it at my leisure. You can't figure it out till you touch it with your own hands. It's easier to figure it out with knowledgeable people. Thanks for the tips.
 
zhuki:
salesman77:
Where to put :



double iOpen( string symbol, int timeframe, int shift)


And what is this declaration, try to explain !!!!

Returns opening price value of bar specified by shift parameter from corresponding chart (symbol, timeframe).
In case of an error, the function returns 0. That's what I understood from the above written advice.
 
But where to put it? :)
Reason: