Errors, bugs, questions - page 2112

 
Still relevant

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2016.08.25 12:32

Execution error in Optimize=1 and/or debug mode.

#property strict

class A
{
public:  
  bool operator ==( int ) const { return(true); }
};

void OnStart()
{
  Print((A*)NULL == 0); // Optimize=1 or _DEBUG - invalid pointer access. Optimize=0 and _RELEASE - no problem.
}
 

Error during execution

#define  MACRO1  "AAA" \
                "BBB"
#define  MACRO2  "CCC"
void OnStart()
{
        string text = MACRO1 MACRO2;
        Print( text );
}

Result: AAACCCBBB
Expected: AAABBBCCC

 

Compilation error

#define  MACRO1  "AAA" \
                "BBB"
#define  MACRO2  "CCC"
#define  MACRO3  "DDD" \
                "EEE"
void OnStart()
{
        string text12 = MACRO1 MACRO2; //нормально
        string text13 = MACRO1 MACRO3; //error:
}                                      //       '}' - semicolon expected
 
A100:

Confusing macro highlighting - context-independent

either always present (option B) or always absent (option A)

It was expected that if a macro was defined in a particular string it would be highlighted, if it was not defined it would not be highlighted. Otherwise it's not clear what presence/absence of highlighting means.

Is it on the site? The engine on the site cannot recognise custom macros in the code

 
 

Always wondered why the text in OBJ_BUTTON buttons is offset ???

It doesn't look nice when creating miniature panels...


 

Thank you for your hard work and it's cool...



 
Vladimir Pastushak:

Always wondered why the text in OBJ_BUTTON buttons is offset ???

It doesn't look nice when creating miniature panels...



Try reducing the size of the arrow. I had the same thing.

 

CHART_KEYBOARD_CONTROL

Enables keyboard control of the chart ("Home", "End", "PageUp", "+", "-", "Up Arrow", etc.). Setting CHART_KEYBOARD_CONTROL=false allows to disable scrolling and scaling of the chart but still allows to receive events when these keys are pressed inOnChartEvent().

bool



can I also disable the Copy and Paste (Ctrl+C Ctrl+V) commands? so that I can copy text from the EDIT field

 
Vladimir Pastushak:

cool how it works...

Now a typical message on the forum

Forum on trading, automated trading systems and testing trading strategies

How to compile this code on MT5

Vladimir Karputov, 2014.04.08 13:41

Compile -F7 in MetaEditor. And to insert code into the forum, please use the SCR button
It will look like this: To insert code into the forum, please use the </> button