rgerasimen:
我想介绍一下MT4 Java API:http://www.easy-share.com/1908253435/jfx-1.2.2.tar.gz
MT4终端Java API(JFX)旨在通过标准MetaTrader 4客户终端(MT4终端)向MetaQuotes交易服务器提供Java接口。
服务器提供Java接口,通过标准MetaTrader 4客户终端(MT4终端)。
To make use of JFX API, one must create its own strategy java class, extending com. jfx. strategy. Strategy and overriding coordinate() method: public class MyStrategy extends com. jfx. strategy. Strategy { public void init( String symbol, int period, StrategyRunner strategyRunner) { super. init( symbol, period, strategyRunner); // // load existing orders, recover itself from the previous shutdown // } public void deinit() { // release resources on EA exit } public void coordinate() { // trading logic goes here /* make use of all API methods: accountBalance, accountCompany, accountCredit, accountCurrency, accountEquity, accountFreeMargin, accountMargin, accountName, accountNumber, accountProfit, comment, day, dayOfWeek, dayOfYear, getLastError, getTickCount, hour, iAC, iAD, iADX, iAlligator, iAO, iATR, iBands, iBars, iBarShift, iBearsPower, iBullsPower, iBWMFI, iCCI, iClose, iCustom, iDeMarker, iEnvelopes, iForce, iFractals, iGator, iHigh, iHighest, iLow, iLowest, iMA, iMACD, iMFI, iMomentum, iOBV, iOpen, iOsMA, iRSI, iRVI, iSAR, isConnected, isDemo, iStdDev, isTesting, iStochastic, isTradeContextBusy, isVisualMode, iTime, iVolume, iWPR, marketInfo, minute, month, objectCreate, objectCreate, objectCreate, objectDelete, objectGet, objectGetFiboDescription, objectSet, objectSetFiboDescription, objectSetText, objectsTotal, objectType, orderClose, orderCloseBy, orderClosePrice, orderCloseTime, orderComment, orderCommission, orderDelete, orderExpiration, orderLots, orderMagicNumber, orderModify, orderOpenPrice, orderOpenTime, orderPrint, orderProfit, orderSelect, orderSend,ordersHistoryTotal, orderStopLoss, ordersTotal, orderSwap, orderSymbol, orderTakeProfit, orderTicket, orderType, print, refreshRates, seconds, timeCurrent, year */ } }
// Java: double point = marketInfo( EURUSD, MarketInfo.MODE_POINT); double price = marketInfo( EURUSD, MarketInfo.MODE_ASK); buyPrice = price; int ticket = orderSend( EURUSD, TradeOperation.OP_BUY, 1, buyPrice, 2, price - 100 * point, price + 100 * point, "" + System. currentTimeMillis(), 0, new Date( System. currentTimeMillis() + 60 * 60 * 1000), -1 ); System. out. println("---------------------------------------"); System. out. println("Buy order ticket: " + ticket);
rgerasimen:
Nice!!!!
恭贺你
Dan aka BearNaked
这是一个学术活动吗?
你能在Java中做什么,而在MQL4中不能做什么?
blogzr3:
这是一个学术活动吗?
你能在Java中做什么,而在MQL4中做不到?
更复杂的机器人...Java是面向对象的,MQL4则不是。
blogzr3:
这是一个学术活动吗?
你能在Java中做什么,而在MQL4中不能做什么?
至少,你可以设置断点
我想介绍一下MT4 Java API:http://www.easy-share.com/1908253435/jfx-1.2.2.tar.gz
MT4终端Java API(JFX)旨在通过标准MetaTrader 4客户终端(MT4终端)为MetaQuotes交易 服务器提供Java接口。
的Java接口,通过标准MetaTrader 4客户终端(MT4终端)。