com.jfx.strategy
Class Strategy
java.lang.Object
com.jfx.MT4
com.jfx.strategy.Strategy
- Direct Known Subclasses:
- DummyStrategy, MainStrategy
public abstract class Strategy
- extends MT4
Created by IntelliJ IDEA.
User: roman
Date: 22/5/2009
Time: 15:39:32
Methods inherited from class com.jfx.MT4 |
accountBalance, accountCompany, accountCredit, accountCurrency, accountEquity, accountFreeMargin, accountMargin, accountName, accountNumber, accountProfit, accountStopoutLevel, accountStopoutMode, comment, day, dayOfWeek, dayOfYear, getLastError, getStrategyRunner, 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, setOrdersProcessingChannel, setStrategyRunner, timeCurrent, year |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
groupsMap
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> groupsMap
groups
public java.util.ArrayList<java.lang.String> groups
symbols
public java.util.ArrayList<java.lang.String> symbols
instruments
public java.util.ArrayList<Strategy.Instrument> instruments
Strategy
public Strategy()
isAlive
public boolean isAlive()
getSymbol
public java.lang.String getSymbol()
getPeriod
public int getPeriod()
isTradeAllowed
public boolean isTradeAllowed()
throws ErrUnknownSymbol
- Throws:
ErrUnknownSymbol
getSlippage
public int getSlippage()
getSymbols
public java.util.ArrayList<java.lang.String> getSymbols()
- Provides list of all available on MT4 Terminal instruments.
Valid only when connect() and init() methods are completed.
- Returns:
- List of all available on MT4 Terminal symbols.
getInstruments
public java.util.ArrayList<Strategy.Instrument> getInstruments()
- Provides list of all available on MT4 Terminal instruments.
Valid only when connect() and init() methods are completed.
- Returns:
- List of all available on MT4 Terminal instruments.
init
public void init(java.lang.String symbol,
int period,
StrategyRunner strategyRunner)
throws ErrUnknownSymbol,
java.io.IOException
- Throws:
ErrUnknownSymbol
java.io.IOException
isReconnect
public boolean isReconnect()
setReconnect
public void setReconnect(boolean reconnect)
deinit
public void deinit()
setTermServerHost
public void setTermServerHost(java.lang.String termServerHost)
setTermServerPort
public void setTermServerPort(int termServerPort)
setMt4Server
public void setMt4Server(Broker mt4Server)
setMt4User
public void setMt4User(java.lang.String mt4User)
setMt4Password
public void setMt4Password(java.lang.String mt4Password)
coordinate
public abstract void coordinate()
getStrategy
public static Strategy getStrategy(java.lang.String id)
removeStrategy
public static Strategy removeStrategy(java.lang.String id)
disconnect
public void disconnect()
throws java.io.IOException
- Disconnects from MT4 Client Terminal.
- Throws:
java.io.IOException
- in case of Terminal Server is unreachable
close
public void close()
throws java.io.IOException
- Kills MT4 Client Terminal (remotely)
- Throws:
java.io.IOException
- in case of Terminal Server is unreachable
connect
protected void connect(java.lang.String termServerHost,
int termServerPort,
Broker mt4Server,
java.lang.String mt4User,
java.lang.String mt4Password)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2008-2009 Roman Gerasimenko.