MT4 Trade Panel Lot Step

ぃ、小莉子 提交于 2019-12-08 13:02:41

问题


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);
}

回答1:


The GUI-Objects v/s MMI-Add-On-s in the MT4 Context:

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 Code:

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)


来源:https://stackoverflow.com/questions/39908492/mt4-trade-panel-lot-step

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!