I need to write "Decrease & Increase" function code for "LOT_MINUS_LABEL".
int OnInit() {
ObjectCreate ( 0, "LOT_MINUS_LABEL", OBJ_LABEL, 0, 0, 0 );
}
int OnChartEvent()
{
MarketInfo(Symbol, MODE_LOTSTEP);
}
I need to write "Decrease & Increase" function code for "LOT_MINUS_LABEL".
int OnInit() {
ObjectCreate ( 0, "LOT_MINUS_LABEL", OBJ_LABEL, 0, 0, 0 );
}
int OnChartEvent()
{
MarketInfo(Symbol, MODE_LOTSTEP);
}
While MQL4
has evolved in several waves into a still creeping New-MQL4.56789
, there are some MetaTrader Terminal context, that has restrictions to keep in mind.
After many years in pure-charting GUI, MetaQuotes Inc. has come with a few "innovative" toys, that were somehow visually pleasing the audience --- "One-Click-Trading"-GUI-complete-MVC-Panel being such example, or the "Depth-Of-Market"-GUI-Visualiser-Only-Panel.
The point is, that both of these "add-on"-s had zero-API available and any of your needs thus remained just for as-is viewing these isolated MMI-gadgets, whereas the real Scripted / EA-driven usage of neither a "OneClickTrading" nor the "Depth-of-Market" values ( the less the BuySell actors available in "OCT" ) were simply out of one's reach.
The snippet is far from showing any direction or any requirement specification or at least some inventory of key core/non-core functionalities intended to be operated in the final state.
Let me thus comment on the obvious items the code has to resolve before making it at least a compile-ready one:
int OnInit() {
ObjectCreate ( 0, "LOT_MINUS_LABEL", OBJ_LABEL, 0, 0, 0 );
}
int OnChartEvent() { // function declared to return int
MarketInfo( _Symbol, MODE_LOTSTEP ); // function call returns a value
// but does not assign it
// to anything, so is lost
} // }-EndOfFunc & MUST RETURN(INT)