So that you can write yourself a reminder - what's the function
:))) as if I can't do it myself when I need to: insert two slashes and write a couple of words. Have you tried writing something in that frame? That forward slash on the right will go to the right by the number of characters you typed, but what if you need to write more than one line? Instead of doing something, I have to waste my time on drawing frames. It's just that the ide imposes some kind of sick vision of how it should be.
:))) as if I can't do it myself when I need to: insert two slashes and write a couple of words. Have you tried writing something in that frame? That forward slash on the right will go off by the number of characters you typed to the right, but what if you need to write more than one line? Instead of doing something, I have to waste my time on drawing frames. I'm just imposing some sick vision of how it should be.
Put two slashes in front of the function and you're good to go.
When the button is clicked, a horizontal line is created. They are recreated with a different colour depending on the position of the cursor in relation to the price. The problem is: yellow and grey lines are flickering and constantly being created (green is OK) when the cursor is at the appropriate position away from the price. Similar code changing only line colour property, not recreating it, works correctly.
The logical NOT here is in its place, i.e. instead of writing == 0.
voidOnChartEvent(constint id, constlong &lparam, constdouble &dparam, conststring &sparam)
{
...
...
...
if(ObjectGetInteger(0,"Button Stop Order",OBJPROP_STATE)){
int x = (int)lparam;
int y = (int)dparam;
//Переведём координаты X, Y в дату и времяif(ChartXYToTimePrice(0,x,y,window,dt,price)){
//Линия меняет цвет с зелёного на желтыйif(price < Bid){
if(!ObjectFind("Buy Stop") || !ObjectFind("not allowed")){
ObjectDelete(line_name);
line_name = "Sell Stop";
CreateLine(line_name, clrYellow);
}
}
//Линия меняет цвет с желтого на зелёныйif(price > Ask){
if(!ObjectFind("Sell Stop") || !ObjectFind("not allowed")){
ObjectDelete(line_name);
line_name = "Buy Stop";
CreateLine(line_name, clrGreen);
}
}
//Линия меняет цвет на серый если в зоне спредаif(price > Bid && price < Ask){
if(!ObjectFind("Buy Stop") || !ObjectFind("Sell Stop")){
ObjectDelete(line_name);
line_name = "not allowed";
CreateLine(line_name, clrGray);
}
}
//Прикрепляем линию к курсоруif(id == CHARTEVENT_MOUSE_MOVE)
if(ObjectMove(0,line_name,0,0,price))
ChartRedraw(0);
}
}elseif(ObjectFind(line_name) == window) Print(ObjectDelete(line_name));
Nerd Trader a horizontal line is created. They are recreated in a different colour depending on the position of the cursor in relation to the price. The problem is: yellow and grey lines are flickering and constantly being created (green is OK) when the cursor is at the appropriate position from the price. Similar code changing only line colour property, not recreating it, works correctly.
The logical NOT here is in its place, i.e. instead of writing == 0.
Because it really pisses me off when you decide to move to a native mql4 environment and there you go! Would you like a frame? And we will sell it anyway.
You have to use Makar's method to get what you want.
Nerd Trader #: in this case there is no difference "!" or "==0"
There is a difference!!!
if(!ObjectFind("Buy Stop"))Print("All right Христофор Бонифатич!");
elsePrint("Something is wrong!");
if(ObjectFind("Buy Stop")!=0)Print("All right Христофор Бонифатич");
The ObjectFind() function returns the number of the main window. And this number is 0. On the other hand, 0 == false, so it follows that if the function returns 0, it still returns false. Of course, I would not use this because if the function returns -1, i.e. an error, we may consider the location of the object not in the main window. On top of that, you never know what fixes will be made...
In general, do not argue and do not learn to do so ...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
So that you can write yourself a reminder - what's the function
:))) as if I can't do it myself when I need to: insert two slashes and write a couple of words. Have you tried writing something in that frame? That forward slash on the right will go to the right by the number of characters you typed, but what if you need to write more than one line? Instead of doing something, I have to waste my time on drawing frames. It's just that the ide imposes some kind of sick vision of how it should be.
:))) as if I can't do it myself when I need to: insert two slashes and write a couple of words. Have you tried writing something in that frame? That forward slash on the right will go off by the number of characters you typed to the right, but what if you need to write more than one line? Instead of doing something, I have to waste my time on drawing frames. I'm just imposing some sick vision of how it should be.
Put two slashes in front of the function and you're good to go.
Put two slashes in front of the function and you're good to go
When the button is clicked, a horizontal line is created. They are recreated with a different colour depending on the position of the cursor in relation to the price. The problem is: yellow and grey lines are flickering and constantly being created (green is OK) when the cursor is at the appropriate position away from the price. Similar code changing only line colour property, not recreating it, works correctly.
The logical NOT here is in its place, i.e. instead of writing == 0.
The logical NOT here is in its place, i.e. instead of writing == 0.
Because it really pisses me off when you decide to move to a native mql4 environment and there you go! Would you like a frame? And we will sell it anyway.
You have to use Makar's method to get what you want.
I didn't know about the styles, so I formatted them the way I wanted to read them.
ObjectFind is an int, not a bool
in this case there is no difference "!" or "==0"
There is a difference!!!
in this case there is no difference "!" or "==0"
This query goes like this:
Vasily Ivanovich Chapayev and Petka are flying in an aeroplane, and suddenly Vasily Ivanovich, sitting at the pilot's wheel, cries out:
"Petya, the instruments!"
Petya replies: "Thirty-eight."
Vasily Ivanovich: "Thirty-eight what?"
Petya: "What about the instruments?"
This request looks like this:
No Makar, it looks like this:
The ObjectFind() function returns the number of the main window. And this number is 0. On the other hand, 0 == false, so it follows that if the function returns 0, it still returns false. Of course, I would not use this because if the function returns -1, i.e. an error, we may consider the location of the object not in the main window. On top of that, you never know what fixes will be made...
In general, do not argue and do not learn to do so ...