Errors, bugs, questions - page 1595

 
Aliaksandr Kryvanos:
If an order is closed by a stop loss, the comment should be [SL] [sl] [s/l] normally, right or wrong? It says so in the help. But the comment is blank and the order closed on stop-loss - 2016.06.06.15:33:18.140 '52722': order #4802270 buy 0.02 EURUSD.ecn at 1.13634 closed due to stop-loss at price 1.13620. Is this a mistake? How do I know then that the order closed on a stop-loss?
And how do you read the comment of this closed order?
 
The program reads StringFind(OrderComment()), and in the history of the account in the comment is an empty line, on the demo when closing on the sl the comment was put, on the real no
 
Aliaksandr Kryvanos:
The program reads StringFind(OrderComment()), and in the history of the account in the comment is an empty string, on the demo when closing on the sl comment was put, in real life is not

Here's something for you to think about

StringFind

Search for a substring in a string.

intStringFind(
stringstring_value,//string we are looking for
stringmatch_substring,//what we are searching for
intstart_pos=0// which position to start search
);

Parameters

string_value

[in] String to search in.

match_substring

[in] Match_substring to be searched.

start_pos=0

[in] Position in the string where the search should be started.

Returned value

Returns the number of the position in the string at which the substring to be searched starts, or -1 if no substring is found.

 
I wrote it that way) just not completely StringFind(OrderComment(), "[sl]") >= 0, anyway, I don't understand why there is a comment on the demo, but not on the real one? Maybe it's a "quirk" of the broker?
 

There is no uniformity in logical expressions

int f() { return 0; }
void g()
{
        if (      f() )         //1//нормально
                return;
        if ( (int)f() )         //2//warning: expression not boolean
                return;
}

It would be logical to interpret both expressions in the same way

Expressions of the second type quite often result implicitly from macrosubstitutions, and superfluous expressions cause confusion

 

In MT4 when using the standard zigzag the hairpin has turned black (the correct colour is green). The colour scheme settings are standard, but changed the background from black to white to make the problem visible.

 

There's something wrong with the picture

YandexBrowser Version 16.4.1.8949

 

The compiler does not specify an array index

class A { public:
        A( int n ) { a[ n ] = new A(); i[ n ] = n; }
        A() {}
        void f() { a[ i ].g(); } //нормально, но i сам является массивом
        void g() {}
         A *a[ 5 ];
        int i[ 5 ];
};
void OnStart()
{
        A a( 0 );
        a.f();
}
 

I've noticed a difference in the display of text on the canvas and with the text marker.


Is there any mode for canva to display as a text marker?

This is needed when combining controls based on a canvas with graphical objects. The lettering on them looks different.

 
Andrey Voytenko:

I've noticed a difference in the display of text on the canvas and with the text marker.


Is there any mode for canva to display as a text marker?

This is needed when combining controls based on a canvas with graphical objects. The lettering on them looks different.

Alternatively, use canvas in COLOR_FORMAT_XRGB_NOALPHA mode.
Reason: