|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jfx.MT4
public class MT4
Constructor Summary | |
---|---|
MT4()
|
Method Summary | |
---|---|
double |
accountBalance()
Returns balance value of the current account (the amount of money on the account). |
java.lang.String |
accountCompany()
Returns the brokerage company name where the current account was registered. |
double |
accountCredit()
Returns credit value of the current account. |
java.lang.String |
accountCurrency()
Returns currency name of the current account. |
double |
accountEquity()
Returns equity value of the current account. |
double |
accountFreeMargin()
Returns free margin value of the current account. |
double |
accountFreeMarginCheck(java.lang.String symbol,
TradeOperation cmd,
double volume)
Returns free margin that remains after the specified position has been opened at the current price on the current account. |
double |
accountFreeMarginMode()
Calculation mode of free margin allowed to open positions on the current account. |
int |
accountLeverage()
Returns leverage of the current account. |
double |
accountMargin()
Returns margin value of the current account. |
java.lang.String |
accountName()
Returns the current account name. |
int |
accountNumber()
Returns the number of the current account |
double |
accountProfit()
Returns profit value of the current account. |
java.lang.String |
accountServer()
Returns the connected server name. |
int |
accountStopoutLevel()
Returns the value of the Stop Out level. |
int |
accountStopoutMode()
Returns the calculation mode for the Stop Out level. |
void |
alert(java.lang.String arg)
Displays a dialog box containing the user-defined data. |
void |
comment(java.lang.String comments)
The function outputs the comment defined by the user in the left top corner of the chart. |
int |
day()
Returns the current day of the month, i.e., the day of month of the last known server time. |
int |
dayOfWeek()
Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time. |
int |
dayOfYear()
Returns the current day of the year (1 means 1 January,..,365(6) does 31 December), i.e., the day of year of the last known server time. |
int |
getLastError()
The function returns the last occurred error, then the value of special last_error variable where the last error code is stored will be zeroized. |
StrategyRunner |
getStrategyRunner()
|
int |
getTickCount()
The GetTickCount() function retrieves the number of milliseconds that have elapsed since the system was started. |
protected long |
getTZCorrectionOffset(long time)
|
void |
hideTestIndicators(boolean shift)
The function sets a flag hiding indicators called by the Expert Advisor. |
int |
hour()
Returns the hour (0,1,2,..23) of the last known server time by the moment of the program start (this value will not change within the time of the program execution). |
double |
iAC(java.lang.String symbol,
Timeframe timeframe,
int shift)
Calculates the Bill Williams' Accelerator/Decelerator oscillator. |
double |
iAD(java.lang.String symbol,
Timeframe timeframe,
int shift)
Calculates the Accumulation/Distribution indicator and returns its value. |
double |
iADX(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
ADXIndicatorLines mode,
int shift)
Calculates the Movement directional index and returns its value. |
double |
iAlligator(java.lang.String symbol,
Timeframe timeframe,
int jawPeriod,
int jawShift,
int teethPeriod,
int teethShift,
int lipsPeriod,
int lipsShift,
MovingAverageMethod maMethod,
AppliedPrice appliedPrice,
GatorMode mode,
int shift)
Calculates the Bill Williams' Alligator and returns its value. |
double |
iAO(java.lang.String symbol,
Timeframe timeframe,
int shift)
Calculates the Bill Williams' Awesome oscillator and returns its value. |
double |
iATR(java.lang.String symbol,
Timeframe timeframe,
int period,
int shift)
Calculates the Indicator of the average true range and returns its value. |
double |
iBands(java.lang.String symbol,
Timeframe timeframe,
int period,
int deviation,
int bandsShift,
AppliedPrice appliedPrice,
BandsIndicatorLines mode,
int shift)
Calculates the Movement directional index and returns its value. |
int |
iBars(java.lang.String symbol,
Timeframe timeframe)
Returns the number of bars on the specified chart. |
int |
iBarShift(java.lang.String symbol,
Timeframe timeframe,
java.util.Date time,
boolean exact)
Search for bar by open time. |
double |
iBearsPower(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
int shift)
Calculates the Bears Power indicator and returns its value. |
double |
iBullsPower(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
int shift)
Calculates the Bulls Power indicator and returns its value. |
double |
iBWMFI(java.lang.String symbol,
Timeframe timeframe,
int shift)
Calculates the Bill Williams Market Facilitation index and returns its value. |
double |
iCCI(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
int shift)
Calculates the Commodity channel index and returns its value. |
double |
iClose(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns Close value for the bar of indicated symbol with timeframe and shift. |
double |
iCustom(java.lang.String symbol,
Timeframe timeframe,
java.lang.String name,
int mode,
int shift)
Calculates the specified custom indicator and returns its value. |
double |
iDeMarker(java.lang.String symbol,
Timeframe timeframe,
int period,
int shift)
Calculates the DeMarker indicator and returns its value. |
double |
iEnvelopes(java.lang.String symbol,
Timeframe timeframe,
int maPeriod,
MovingAverageMethod maMethod,
int maShitf,
AppliedPrice appliedPrice,
double deviation,
BandsIndicatorLines mode,
int shift)
Calculates the Envelopes indicator and returns its value. |
double |
iForce(java.lang.String symbol,
Timeframe timeframe,
int period,
MovingAverageMethod maMethod,
AppliedPrice appliedPrice,
int shift)
Calculates the Force index and returns its value. |
double |
iFractals(java.lang.String symbol,
Timeframe timeframe,
BandsIndicatorLines mode,
int shift)
Calculates the Fractals and returns its value. |
double |
iGator(java.lang.String symbol,
Timeframe timeframe,
int jawPeriod,
int jawShift,
int teethPeriod,
int teethShift,
int lipsPeriod,
int lipsShift,
MovingAverageMethod maMethod,
AppliedPrice appliedPrice,
GatorMode mode,
int shift)
Gator oscillator calculation. |
double |
iHigh(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns High value for the bar of indicated symbol with timeframe and shift. |
int |
iHighest(java.lang.String symbol,
Timeframe timeframe,
Series type,
int count,
int start)
Returns the shift of the maximum value over a specific number of periods depending on type. |
double |
iIchimoku(java.lang.String symbol,
Timeframe timeframe,
int tenkan_sen,
int kijun_sen,
int senkou_span_b,
IchimokuSource mode,
int shift)
Calculates the Ichimoku Kinko Hyo and returns its value. |
double |
iLow(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns Low value for the bar of indicated symbol with timeframe and shift. |
int |
iLowest(java.lang.String symbol,
Timeframe timeframe,
Series type,
int count,
int start)
Returns the shift of the least value over a specific number of periods depending on type. |
double |
iMA(java.lang.String symbol,
Timeframe timeframe,
int period,
int maShift,
MovingAverageMethod maMethod,
AppliedPrice appliedPrice,
int shift)
Calculates the Moving average indicator and returns its value. |
double |
iMACD(java.lang.String symbol,
Timeframe timeframe,
int fastEMAPeriod,
int slowEMAPeriod,
int signalPeriod,
AppliedPrice appliedPrice,
MACDIndicatorLines mode,
int shift)
Calculates the Moving averages convergence/divergence and returns its value. |
double |
iMFI(java.lang.String symbol,
Timeframe timeframe,
int period,
int shift)
Calculates the Money flow index and returns its value. |
double |
iMomentum(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
int shift)
Calculates the Momentum indicator and returns its value. |
double |
iOBV(java.lang.String symbol,
Timeframe timeframe,
AppliedPrice appliedPrice,
int shift)
Calculates the On Balance Volume indicator and returns its value. |
double |
iOpen(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns Open value for the bar of indicated symbol with timeframe and shift. |
double |
iOsMA(java.lang.String symbol,
Timeframe timeframe,
int fastEMAPeriod,
int slowEMAPeriod,
int signalPeriod,
AppliedPrice appliedPrice,
int shift)
Calculates the Moving Average of Oscillator and returns its value. |
double |
iRSI(java.lang.String symbol,
Timeframe timeframe,
int period,
AppliedPrice appliedPrice,
int shift)
Calculates the Relative strength index and returns its value. |
double |
iRVI(java.lang.String symbol,
Timeframe timeframe,
int period,
MACDIndicatorLines mode,
int shift)
Calculates the Relative Vigor index and returns its value. |
double |
iSAR(java.lang.String symbol,
Timeframe timeframe,
double step,
double maximum,
int shift)
Calculates the Parabolic Stop and Reverse system and returns its value. |
boolean |
isConnected()
The function returns the status of the main connection between client terminal and server that performs data pumping. |
boolean |
isDemo()
Returns TRUE if the expert runs on a demo account, otherwise returns FALSE. |
boolean |
isDllsAllowed()
Returns TRUE if the function DLL call is allowed for the expert, otherwise returns FALSE. |
boolean |
isExpertEnabled()
Returns TRUE if expert advisors are enabled for running, otherwise returns FALSE. |
boolean |
isLibrariesAllowed()
Returns TRUE if the expert can call library function, otherwise returns FALSE. |
boolean |
isOptimization()
Returns TRUE if expert runs in the strategy tester optimization mode, otherwise returns FALSE. |
boolean |
isStopped()
Returns TRUE if the program (an expert or a script) has been commanded to stop its operation, otherwise returns FALSE. |
double |
iStdDev(java.lang.String symbol,
Timeframe timeframe,
int maPeriod,
int maShift,
MovingAverageMethod maMethod,
AppliedPrice appliedPrice,
int shift)
Calculates the Standard Deviation indicator and returns its value. |
boolean |
isTesting()
Returns TRUE if expert runs in the testing mode, otherwise returns FALSE. |
double |
iStochastic(java.lang.String symbol,
Timeframe timeframe,
int kPeriod,
int dPeriod,
int slowing,
MovingAverageMethod maMethod,
int priceField,
MACDIndicatorLines mode,
int shift)
Calculates the Stochastic oscillator and returns its value. |
boolean |
isTradeAllowed()
Returns TRUE if the expert is allowed to trade and a thread for trading is not occupied, otherwise returns FALSE. |
boolean |
isTradeContextBusy()
Returns TRUE if a thread for trading is occupied by another expert advisor, otherwise returns FALSE. |
boolean |
isVisualMode()
Returns TRUE if the expert is tested with checked 'Visual Mode' button, otherwise returns FALSE. |
java.util.Date |
iTime(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns Time value for the bar of indicated symbol with timeframe and shift. |
double |
iVolume(java.lang.String symbol,
Timeframe timeframe,
int shift)
Returns Tick Volume value for the bar of indicated symbol with timeframe and shift. |
double |
iWPR(java.lang.String symbol,
Timeframe timeframe,
int period,
int shift)
Calculates the Larry William's percent range indicator and returns its value. |
java.util.Date |
marketInfo_MODE_TIME(java.lang.String symbol)
Returns the The last incoming tick time (last known server time). |
double |
marketInfo(java.lang.String symbol,
MarketInfo type)
|
int |
messageBox(java.lang.String text,
java.lang.String caption,
int flags)
The MessageBox function creates, displays, and operates message box. |
int |
minute()
Returns the current minute (0,1,2,..59) of the last known server time by the moment of the program start (this value will not change within the time of the program execution). |
int |
month()
Returns the current month as number (1-January,2,3,4,5,6,7,8,9,10,11,12), i.e., the number of month of the last known server time. |
boolean |
objectCreate(java.lang.String name,
ObjectType type,
int window,
java.util.Date time1,
double price1)
Creation of an object with the specified name, type and initial coordinates in the specified window. |
boolean |
objectCreate(java.lang.String name,
ObjectType type,
int window,
java.util.Date time1,
double price1,
java.util.Date time2,
double price2)
Creation of an object with the specified name, type and initial coordinates in the specified window. |
boolean |
objectCreate(java.lang.String name,
ObjectType type,
int window,
java.util.Date time1,
double price1,
java.util.Date time2,
double price2,
java.util.Date time3,
double price3)
Creation of an object with the specified name, type and initial coordinates in the specified window. |
boolean |
objectDelete(java.lang.String name)
Deletes object having the specified name. |
java.lang.String |
objectDescription(java.lang.String name)
Return object description. |
int |
objectFind(java.lang.String name)
Search for an object having the specified name. |
double |
objectGet(java.lang.String name,
ObjectProperty index)
The function returns the value of the specified object property. |
java.lang.String |
objectGetFiboDescription(java.lang.String name,
int index)
The function returns the level description of a Fibonacci object. |
int |
objectGetShiftByValue(java.lang.String name,
double value)
The function calculates and returns bar index (shift related to the current bar) for the given price. |
double |
objectGetValueByShift(java.lang.String name,
int shift)
The function calculates and returns the price value for the specified bar (shift related to the current bar). |
boolean |
objectMove(java.lang.String name,
int point,
java.util.Date time1,
double price1)
The function moves an object coordinate in the chart. |
java.lang.String |
objectName(int index)
The function returns the object name by its index in the objects list. |
int |
objectsDeleteAll(int window,
int type)
Removes all objects of the specified type and in the specified sub-window of the chart. |
boolean |
objectSet(java.lang.String name,
ObjectProperty index,
double value)
Changes the value of the specified object property. |
boolean |
objectSetFiboDescription(java.lang.String name,
int index,
java.lang.String text)
The function assigns a new description to a level of a Fibonacci object. |
boolean |
objectSetText(java.lang.String name,
java.lang.String text,
int font_size,
java.lang.String font,
long text_color)
Changes the object description. |
int |
objectsTotal(ObjectType type)
Returns total amount of objects of the specified type in the chart. |
int |
objectType(java.lang.String name)
The function returns the object type value. |
boolean |
orderClose(int ticket,
double lots,
double price,
int slippage,
long arrowColor)
Closes opened order. |
boolean |
orderCloseBy(int ticket,
int opposite,
long arrowColor)
Closes an opened order by another opposite opened order. |
double |
orderClosePrice()
Returns close price for the currently selected order. |
java.util.Date |
orderCloseTime()
Returns close time for the currently selected order. |
java.lang.String |
orderComment()
Returns comment for the selected order. |
double |
orderCommission()
Returns calculated commission for the currently selected order. |
boolean |
orderDelete(int ticket,
long arrowColor)
Deletes previously opened pending order. |
double |
orderExpiration()
Returns expiration date for the selected pending order. |
double |
orderLots()
Returns amount of lots for the selected order. |
int |
orderMagicNumber()
Returns an identifying (magic) number for the currently selected order. |
boolean |
orderModify(int ticket,
double price,
double stoploss,
double takeprofit,
java.util.Date expiration,
long arrowColor)
Modification of characteristics for the previously opened position or pending orders. |
double |
orderOpenPrice()
Returns open price for the currently selected order. |
java.util.Date |
orderOpenTime()
Returns open time for the currently selected order. |
void |
orderPrint()
Prints information about the selected order in the log in the following format: ticket number; open time; trade operation; amount of lots; open price; Stop Loss; Take Profit; close time; close price; commission; swap; profit; comment; magic number; pending order expiration date. |
double |
orderProfit()
Returns the net profit value (without swaps or commissions) for the selected order. |
boolean |
orderSelect(int index,
SelectionType select,
SelectionPool pool)
The function selects an order for further processing. |
int |
orderSend(java.lang.String symbol,
TradeOperation cmd,
double volume,
double price,
int slippage,
double stoploss,
double takeprofit,
java.lang.String comment,
int magic,
java.util.Date expiration,
long arrowColor)
The main function used to open a position or place a pending order. |
int |
ordersHistoryTotal()
Returns the number of closed orders in the account history loaded into the terminal. |
double |
orderStopLoss()
Returns stop loss value for the currently selected order. |
int |
ordersTotal()
Returns market and pending orders count. |
double |
orderSwap()
Returns swap value for the currently selected order. |
java.lang.String |
orderSymbol()
Returns the order symbol value for selected order. |
double |
orderTakeProfit()
Returns take profit value for the currently selected order. |
int |
orderTicket()
Returns ticket number for the currently selected order. |
int |
orderType()
Returns order operation type for the currently selected order. |
int |
period()
Returns the amount of minutes determining the used period (chart timeframe). |
void |
playSound(java.lang.String filename)
Function plays a sound file. |
void |
print(java.lang.String comments)
Prints a message to the experts log |
boolean |
refreshRates()
Refreshing of data in pre-defined variables and series arrays. |
int |
seconds()
Returns the amount of seconds elapsed from the beginning of the current minute of the last known server time by the moment of the program start (this value will not change within the time of the program execution). |
void |
setOrdersProcessingChannel(StrategyRunner strategyRunner)
|
void |
setStrategyRunner(StrategyRunner strategyRunner)
|
java.lang.String |
symbol()
Returns a text string with the name of the current financial instrument. |
java.lang.String |
terminalCompany()
Returns the name of company owning the client terminal. |
java.lang.String |
terminalName()
Returns client terminal name. |
java.lang.String |
terminalPath()
Returns the directory, from which the client terminal was launched. |
java.util.Date |
timeCurrent()
Returns the last known server time (time of incoming of the latest quote) as number of seconds elapsed from 00:00 January 1, 1970. |
int |
uninitializeReason()
Returns the code of the uninitialization reason for the experts, custom indicators, and scripts. |
int |
windowBarsPerChart()
Function returns the amount of bars visible on the chart. |
java.lang.String |
windowExpertName()
Returns name of the executed expert, script, custom indicator, or library, depending on the MQL4 program, from which this function has been called. |
int |
windowFind(java.lang.String name)
If indicator with name was found, the function returns the window index containing this specified indicator, otherwise it returns -1. |
int |
windowFirstVisibleBar()
The function returns the first visible bar number in the current chart window. |
int |
windowHandle(java.lang.String symbol,
Timeframe timeframe)
Returns the system window handler containing the given chart. |
boolean |
windowIsVisible(int index)
Returns TRUE if the chart subwindow is visible, otherwise returns FALSE. |
int |
windowOnDropped()
Returns window index where expert, custom indicator or script was dropped. |
double |
windowPriceMax(int index)
Returns maximal value of the vertical scale of the specified subwindow of the current chart (0-main chart window, the indicators' subwindows are numbered starting from 1). |
double |
windowPriceMin(int index)
Returns minimal value of the vertical scale of the specified subwindow of the current chart (0-main chart window, the indicators' subwindows are numbered starting from 1). |
double |
windowPriceOnDropped()
Returns the price part of the chart point where expert or script was dropped. |
void |
windowRedraw()
Redraws the current chart forcedly. |
boolean |
windowScreenShot(java.lang.String filename,
int sizeX,
int sizeY,
int startBar,
int chartScale,
int chartMode)
Saves current chart screen shot as a GIF file. |
int |
windowsTotal()
Returns count of indicator windows on the chart (including main chart). |
java.util.Date |
windowTimeOnDropped()
Returns the time part of the chart point where expert or script was dropped. |
int |
windowXOnDropped()
Returns the value at X axis in pixels for the chart window client area point at which the expert or script was dropped. |
int |
windowYOnDropped()
Returns the value at Y axis in pixels for the chart window client area point at which the expert or script was dropped. |
int |
year()
Returns the current year, i.e., the year of the last known server time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MT4()
Method Detail |
---|
protected long getTZCorrectionOffset(long time)
public void setStrategyRunner(StrategyRunner strategyRunner)
public void setOrdersProcessingChannel(StrategyRunner strategyRunner)
public StrategyRunner getStrategyRunner()
public java.util.Date marketInfo_MODE_TIME(java.lang.String symbol) throws ErrUnknownSymbol
ErrUnknownSymbol
public int iBars(java.lang.String symbol, Timeframe timeframe) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
ErrHistoryWillUpdated
ErrUnknownSymbol
public int iBarShift(java.lang.String symbol, Timeframe timeframe, java.util.Date time, boolean exact) throws ErrIncorrectSeriesarrayUsing, ErrUnknownSymbol, ErrHistoryWillUpdated
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.time
- value to find (bar's open time).exact
- Return mode when bar not found. false - iBarShift returns nearest. true - iBarShift returns -1.
ErrIncorrectSeriesarrayUsing
ErrUnknownSymbol
ErrHistoryWillUpdated
public double iClose(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public double iHigh(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public double iLow(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public double iOpen(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public double iVolume(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public java.util.Date iTime(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrHistoryWillUpdated
ErrUnknownSymbol
public int iLowest(java.lang.String symbol, Timeframe timeframe, Series type, int count, int start) throws ErrIncorrectSeriesarrayUsing, ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.type
- Series array identifier. It can be any of Series array identifier enumeration values.count
- Number of periods (in direction from the start bar to the back one) on which the calculation is carried out.start
- Shift showing the bar, relative to the current bar, that the data should be taken from.
ErrIncorrectSeriesarrayUsing
ErrHistoryWillUpdated
ErrUnknownSymbol
public int iHighest(java.lang.String symbol, Timeframe timeframe, Series type, int count, int start) throws ErrIncorrectSeriesarrayUsing, ErrHistoryWillUpdated, ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.type
- Series array identifier. It can be any of Series array identifier enumeration values.count
- Number of periods (in direction from the start bar to the back one) on which the calculation is carried out.start
- Shift showing the bar, relative to the current bar, that the data should be taken from.
ErrIncorrectSeriesarrayUsing
ErrHistoryWillUpdated
ErrUnknownSymbol
public double accountBalance()
public double accountCredit()
public java.lang.String accountCompany()
public java.lang.String accountCurrency()
public double accountEquity()
public double accountFreeMargin()
public double accountMargin()
public java.lang.String accountName()
public int accountNumber()
public double accountProfit()
public int getLastError()
public boolean isConnected()
public boolean isDemo()
public boolean isTesting()
public boolean isVisualMode()
public int getTickCount()
public void comment(java.lang.String comments)
comments
- User defined comment.public double marketInfo(java.lang.String symbol, MarketInfo type) throws ErrUnknownSymbol
symbol
- type
-
ErrUnknownSymbol
public void print(java.lang.String comments)
comments
- User defined message.public int day()
public int dayOfWeek()
public int dayOfYear()
public int hour()
public int minute()
public int month()
public int seconds()
public java.util.Date timeCurrent()
public int year()
public boolean objectCreate(java.lang.String name, ObjectType type, int window, java.util.Date time1, double price1, java.util.Date time2, double price2, java.util.Date time3, double price3)
name
- Object unique name.type
- Object type. It can be any of the Object type enumeration values.window
- Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal().time1
- Time part of the first point.price1
- Price part of the first point.time2
- Time part of the second point.price2
- Price part of the second point.time3
- Time part of the third point.price3
- Price part of the third point.
public boolean objectCreate(java.lang.String name, ObjectType type, int window, java.util.Date time1, double price1)
name
- Object unique name.type
- Object type. It can be any of the Object type enumeration values.window
- Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal().time1
- Time part of the first point.price1
- Price part of the first point.
public boolean objectCreate(java.lang.String name, ObjectType type, int window, java.util.Date time1, double price1, java.util.Date time2, double price2)
name
- Object unique name.type
- Object type. It can be any of the Object type enumeration values.window
- Index of the window where the object will be added. Window index must exceed or equal to 0 and be less than WindowsTotal().time1
- Time part of the first point.price1
- Price part of the first point.time2
- Time part of the second point.price2
- Price part of the second point.
public boolean objectDelete(java.lang.String name)
name
- Object unique name.
public double objectGet(java.lang.String name, ObjectProperty index)
name
- Object unique name.index
- Object property index. It can be any of the Object properties enumeration values.
public boolean objectSet(java.lang.String name, ObjectProperty index, double value)
name
- Object unique name.index
- Object property index. It can be any of the Object properties enumeration values.value
- New value of the given property.
public java.lang.String objectGetFiboDescription(java.lang.String name, int index)
name
- Object unique name.index
- Index of the Fibonacci level (0-31).
public boolean objectSetFiboDescription(java.lang.String name, int index, java.lang.String text)
name
- Object unique name.index
- Index of the Fibonacci level (0-31).text
- New description of the level.
public boolean objectSetText(java.lang.String name, java.lang.String text, int font_size, java.lang.String font, long text_color)
name
- Object unique name.text
- A text describing the object.font_size
- Font size in points.font
- Font name (NULL).text_color
- Text color (CLR_NONE).
public int objectsTotal(ObjectType type)
type
- Optional parameter. An object type to be counted. It can be any of the Object type enumeration values or EMPTY constant to count all objects with any types.
public int objectType(java.lang.String name)
name
- Object unique name.
public double iAC(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iAD(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iAlligator(java.lang.String symbol, Timeframe timeframe, int jawPeriod, int jawShift, int teethPeriod, int teethShift, int lipsPeriod, int lipsShift, MovingAverageMethod maMethod, AppliedPrice appliedPrice, GatorMode mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.jawPeriod
- Blue line averaging period (Alligator's Jaw).jawShift
- Blue line shift relative to the chart.teethPeriod
- Red line averaging period (Alligator's Teeth).teethShift
- Red line shift relative to the chart.lipsPeriod
- Green line averaging period (Alligator's Lips).lipsShift
- Green line shift relative to the chart.maMethod
- MA method. It can be any of Moving Average methods.appliedPrice
- Applied price. It can be any of Applied price enumeration values.mode
- Data source, identifier of a line of the indicator. It can be any of the following values: MODE_GATORJAW - Gator Jaw (blue) balance line, MODE_GATORTEETH - Gator Teeth (red) balance line, MODE_GATORLIPS - Gator Lips (green) balance line.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iADX(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, ADXIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iATR(java.lang.String symbol, Timeframe timeframe, int period, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iAO(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iBearsPower(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iBands(java.lang.String symbol, Timeframe timeframe, int period, int deviation, int bandsShift, AppliedPrice appliedPrice, BandsIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.deviation
- Deviation from the main line.bandsShift
- The indicator shift relative to the chart.appliedPrice
- Applied price. It can be any of Applied price enumeration values.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iBullsPower(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iCCI(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iCustom(java.lang.String symbol, Timeframe timeframe, java.lang.String name, int mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.name
- Custom indicator compiled program name.mode
- Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iDeMarker(java.lang.String symbol, Timeframe timeframe, int period, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iEnvelopes(java.lang.String symbol, Timeframe timeframe, int maPeriod, MovingAverageMethod maMethod, int maShitf, AppliedPrice appliedPrice, double deviation, BandsIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.maPeriod
- Averaging period for calculation of the main line.maMethod
- MA method. It can be any of Moving Average methods.maShitf
- MA shift. Indicator line offset relate to the chart by timeframe.appliedPrice
- Applied price. It can be any of Applied price enumeration values.deviation
- Percent deviation from the main line.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iForce(java.lang.String symbol, Timeframe timeframe, int period, MovingAverageMethod maMethod, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.maMethod
- MA method. It can be any of Moving Average methods.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iFractals(java.lang.String symbol, Timeframe timeframe, BandsIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iGator(java.lang.String symbol, Timeframe timeframe, int jawPeriod, int jawShift, int teethPeriod, int teethShift, int lipsPeriod, int lipsShift, MovingAverageMethod maMethod, AppliedPrice appliedPrice, GatorMode mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.jawPeriod
- Blue line averaging period (Alligator's Jaw).jawShift
- Blue line shift relative to the chart.teethPeriod
- Red line averaging period (Alligator's Teeth).teethShift
- Red line shift relative to the chart.lipsPeriod
- Green line averaging period (Alligator's Lips).lipsShift
- Green line shift relative to the chart.maMethod
- MA method. It can be any of Moving Average methods.appliedPrice
- Applied price. It can be any of Applied price enumeration values.mode
- Data source, identifier of a line of the indicator. It can be any of the following values: MODE_GATORJAW - Gator Jaw (blue) balance line, MODE_GATORTEETH - Gator Teeth (red) balance line, MODE_GATORLIPS - Gator Lips (green) balance line.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iBWMFI(java.lang.String symbol, Timeframe timeframe, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iMomentum(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iMFI(java.lang.String symbol, Timeframe timeframe, int period, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iMA(java.lang.String symbol, Timeframe timeframe, int period, int maShift, MovingAverageMethod maMethod, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.maShift
- MA shift. Indicators line offset relate to the chart by timeframe.maMethod
- MA method. It can be any of the Moving Average method enumeration value.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iOsMA(java.lang.String symbol, Timeframe timeframe, int fastEMAPeriod, int slowEMAPeriod, int signalPeriod, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.fastEMAPeriod
- Number of periods for fast moving average calculation.slowEMAPeriod
- Number of periods for slow moving average calculation.signalPeriod
- Number of periods for signal moving average calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iMACD(java.lang.String symbol, Timeframe timeframe, int fastEMAPeriod, int slowEMAPeriod, int signalPeriod, AppliedPrice appliedPrice, MACDIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.fastEMAPeriod
- Number of periods for fast moving average calculation.slowEMAPeriod
- Number of periods for slow moving average calculation.signalPeriod
- Number of periods for signal moving average calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iOBV(java.lang.String symbol, Timeframe timeframe, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iSAR(java.lang.String symbol, Timeframe timeframe, double step, double maximum, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.step
- Increment, usually 0.02.maximum
- Maximum value, usually 0.2.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iRSI(java.lang.String symbol, Timeframe timeframe, int period, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Number of periods for calculation.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iRVI(java.lang.String symbol, Timeframe timeframe, int period, MACDIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Number of periods for calculation.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iStdDev(java.lang.String symbol, Timeframe timeframe, int maPeriod, int maShift, MovingAverageMethod maMethod, AppliedPrice appliedPrice, int shift) throws ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.maPeriod
- MA periodmaShift
- MA shift. Indicators line offset relate to the chart by timeframe.maMethod
- MA method. It can be any of the Moving Average method enumeration value.appliedPrice
- Applied price. It can be any of Applied price enumeration values.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iStochastic(java.lang.String symbol, Timeframe timeframe, int kPeriod, int dPeriod, int slowing, MovingAverageMethod maMethod, int priceField, MACDIndicatorLines mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol the data of which should be used to calculate indicator; NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.kPeriod
- %K line period.dPeriod
- %D line period.slowing
- Slowing value.maMethod
- MA method. It can be any of the Moving Average method enumeration value.priceField
- Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.mode
- Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public double iWPR(java.lang.String symbol, Timeframe timeframe, int period, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.period
- Averaging period for calculation.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public boolean orderClose(int ticket, double lots, double price, int slippage, long arrowColor) throws ErrCustomIndicatorError, ErrIntegerParameterExpected, ErrInvalidFunctionParamvalue, ErrInvalidPriceParam, ErrInvalidTicket, ErrUnknownSymbol, ErrTradeNotAllowed, ErrCommonError, ErrInvalidTradeParameters, ErrServerBusy, ErrOldVersion, ErrNoConnection, ErrTooFrequentRequests, ErrAccountDisabled, ErrInvalidAccount, ErrTradeTimeout, ErrInvalidPrice, ErrInvalidStops, ErrInvalidTradeVolume, ErrMarketClosed, ErrTradeDisabled, ErrNotEnoughMoney, ErrPriceChanged, ErrOffQuotes, ErrRequote, ErrOrderLocked, ErrLongPositionsOnlyAllowed, ErrTooManyRequests, ErrTradeTimeout2, ErrTradeTimeout3, ErrTradeTimeout4, ErrTradeModifyDenied, ErrTradeContextBusy, ErrTradeExpirationDenied, ErrTradeTooManyOrders
ticket
- Unique number of the order ticket.lots
- Number of lots.price
- Preferred closing price.slippage
- Value of the maximum price slippage in points.arrowColor
- Color of the closing arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
ErrCustomIndicatorError
ErrIntegerParameterExpected
ErrInvalidFunctionParamvalue
ErrInvalidPriceParam
ErrInvalidTicket
ErrUnknownSymbol
ErrTradeNotAllowed
ErrCommonError
ErrInvalidTradeParameters
ErrServerBusy
ErrOldVersion
ErrNoConnection
ErrTooFrequentRequests
ErrAccountDisabled
ErrInvalidAccount
ErrTradeTimeout
ErrInvalidPrice
ErrInvalidStops
ErrInvalidTradeVolume
ErrMarketClosed
ErrTradeDisabled
ErrNotEnoughMoney
ErrPriceChanged
ErrOffQuotes
ErrRequote
ErrOrderLocked
ErrLongPositionsOnlyAllowed
ErrTooManyRequests
ErrTradeTimeout2
ErrTradeTimeout3
ErrTradeTimeout4
ErrTradeModifyDenied
ErrTradeContextBusy
ErrTradeExpirationDenied
ErrTradeTooManyOrders
public boolean orderCloseBy(int ticket, int opposite, long arrowColor) throws ErrCustomIndicatorError, ErrIntegerParameterExpected, ErrInvalidFunctionParamvalue, ErrInvalidTicket, ErrUnknownSymbol, ErrTradeNotAllowed, ErrCommonError, ErrInvalidTradeParameters, ErrServerBusy, ErrOldVersion, ErrNoConnection, ErrTooFrequentRequests, ErrAccountDisabled, ErrInvalidAccount, ErrTradeTimeout, ErrInvalidPrice, ErrInvalidStops, ErrInvalidTradeVolume, ErrMarketClosed, ErrTradeDisabled, ErrNotEnoughMoney, ErrPriceChanged, ErrOffQuotes, ErrRequote, ErrOrderLocked, ErrLongPositionsOnlyAllowed, ErrTooManyRequests, ErrTradeTimeout2, ErrTradeTimeout3, ErrTradeTimeout4, ErrTradeModifyDenied, ErrTradeContextBusy, ErrTradeExpirationDenied, ErrTradeTooManyOrders
ticket
- Unique number of the order ticket.opposite
- Unique number of the opposite order ticket.arrowColor
- Color of the closing arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
ErrCustomIndicatorError
ErrIntegerParameterExpected
ErrInvalidFunctionParamvalue
ErrInvalidTicket
ErrUnknownSymbol
ErrTradeNotAllowed
ErrCommonError
ErrInvalidTradeParameters
ErrServerBusy
ErrOldVersion
ErrNoConnection
ErrTooFrequentRequests
ErrAccountDisabled
ErrInvalidAccount
ErrTradeTimeout
ErrInvalidPrice
ErrInvalidStops
ErrInvalidTradeVolume
ErrMarketClosed
ErrTradeDisabled
ErrNotEnoughMoney
ErrPriceChanged
ErrOffQuotes
ErrRequote
ErrOrderLocked
ErrLongPositionsOnlyAllowed
ErrTooManyRequests
ErrTradeTimeout2
ErrTradeTimeout3
ErrTradeTimeout4
ErrTradeModifyDenied
ErrTradeContextBusy
ErrTradeExpirationDenied
ErrTradeTooManyOrders
public double orderClosePrice() throws ErrNoOrderSelected
ErrNoOrderSelected
public java.util.Date orderCloseTime() throws ErrNoOrderSelected
ErrNoOrderSelected
public java.lang.String orderComment() throws ErrNoOrderSelected
ErrNoOrderSelected
public double orderCommission() throws ErrNoOrderSelected
ErrNoOrderSelected
public boolean orderDelete(int ticket, long arrowColor) throws ErrCustomIndicatorError, ErrInvalidFunctionParamvalue, ErrInvalidTicket, ErrUnknownSymbol, ErrTradeNotAllowed, ErrCommonError, ErrInvalidTradeParameters, ErrServerBusy, ErrOldVersion, ErrNoConnection, ErrTooFrequentRequests, ErrAccountDisabled, ErrInvalidAccount, ErrTradeTimeout, ErrInvalidPrice, ErrInvalidStops, ErrInvalidTradeVolume, ErrMarketClosed, ErrTradeDisabled, ErrNotEnoughMoney, ErrPriceChanged, ErrOffQuotes, ErrRequote, ErrOrderLocked, ErrLongPositionsOnlyAllowed, ErrTooManyRequests, ErrTradeTimeout2, ErrTradeTimeout3, ErrTradeTimeout4, ErrTradeModifyDenied, ErrTradeContextBusy, ErrTradeExpirationDenied, ErrTradeTooManyOrders
ticket
- Unique number of the order ticket.arrowColor
- Color of the arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
ErrCustomIndicatorError
ErrInvalidFunctionParamvalue
ErrInvalidTicket
ErrUnknownSymbol
ErrTradeNotAllowed
ErrCommonError
ErrInvalidTradeParameters
ErrServerBusy
ErrOldVersion
ErrNoConnection
ErrTooFrequentRequests
ErrAccountDisabled
ErrInvalidAccount
ErrTradeTimeout
ErrInvalidPrice
ErrInvalidStops
ErrInvalidTradeVolume
ErrMarketClosed
ErrTradeDisabled
ErrNotEnoughMoney
ErrPriceChanged
ErrOffQuotes
ErrRequote
ErrOrderLocked
ErrLongPositionsOnlyAllowed
ErrTooManyRequests
ErrTradeTimeout2
ErrTradeTimeout3
ErrTradeTimeout4
ErrTradeModifyDenied
ErrTradeContextBusy
ErrTradeExpirationDenied
ErrTradeTooManyOrders
public double orderExpiration() throws ErrNoOrderSelected
ErrNoOrderSelected
public double orderLots() throws ErrNoOrderSelected
ErrNoOrderSelected
public int orderMagicNumber() throws ErrNoOrderSelected
ErrNoOrderSelected
public boolean orderModify(int ticket, double price, double stoploss, double takeprofit, java.util.Date expiration, long arrowColor) throws ErrCustomIndicatorError, ErrIntegerParameterExpected, ErrInvalidFunctionParamvalue, ErrInvalidPriceParam, ErrInvalidTicket, ErrUnknownSymbol, ErrTradeNotAllowed, ErrNoResult, ErrCommonError, ErrInvalidTradeParameters, ErrServerBusy, ErrOldVersion, ErrNoConnection, ErrTooFrequentRequests, ErrAccountDisabled, ErrInvalidAccount, ErrTradeTimeout, ErrInvalidPrice, ErrInvalidStops, ErrInvalidTradeVolume, ErrMarketClosed, ErrTradeDisabled, ErrNotEnoughMoney, ErrPriceChanged, ErrOffQuotes, ErrRequote, ErrOrderLocked, ErrLongPositionsOnlyAllowed, ErrTooManyRequests, ErrTradeTimeout2, ErrTradeTimeout3, ErrTradeTimeout4, ErrTradeModifyDenied, ErrTradeContextBusy, ErrTradeExpirationDenied, ErrTradeTooManyOrders
ticket
- Unique number of the order ticket.price
- New open price of the pending order.stoploss
- New StopLoss level.takeprofit
- New TakeProfit level.expiration
- Pending order expiration time.arrowColor
- Color of the arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
ErrCustomIndicatorError
ErrIntegerParameterExpected
ErrInvalidFunctionParamvalue
ErrInvalidPriceParam
ErrInvalidTicket
ErrUnknownSymbol
ErrTradeNotAllowed
ErrNoResult
ErrCommonError
ErrInvalidTradeParameters
ErrServerBusy
ErrOldVersion
ErrNoConnection
ErrTooFrequentRequests
ErrAccountDisabled
ErrInvalidAccount
ErrTradeTimeout
ErrInvalidPrice
ErrInvalidStops
ErrInvalidTradeVolume
ErrMarketClosed
ErrTradeDisabled
ErrNotEnoughMoney
ErrPriceChanged
ErrOffQuotes
ErrRequote
ErrOrderLocked
ErrLongPositionsOnlyAllowed
ErrTooManyRequests
ErrTradeTimeout2
ErrTradeTimeout3
ErrTradeTimeout4
ErrTradeModifyDenied
ErrTradeContextBusy
ErrTradeExpirationDenied
ErrTradeTooManyOrders
public double orderOpenPrice() throws ErrNoOrderSelected
ErrNoOrderSelected
public java.util.Date orderOpenTime() throws ErrNoOrderSelected
ErrNoOrderSelected
public void orderPrint() throws ErrNoOrderSelected
ErrNoOrderSelected
public double orderProfit() throws ErrNoOrderSelected
ErrNoOrderSelected
public boolean orderSelect(int index, SelectionType select, SelectionPool pool)
index
- Order index or order ticket depending on the second parameter.select
- Selecting flags. It can be any of the following values: SELECT_BY_POS - index in the order pool, SELECT_BY_TICKET - index is order ticket.pool
- Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values: MODE_TRADES (default)- order selected from trading pool(opened and pending orders), MODE_HISTORY - order selected from history pool (closed and canceled order).
public int orderSend(java.lang.String symbol, TradeOperation cmd, double volume, double price, int slippage, double stoploss, double takeprofit, java.lang.String comment, int magic, java.util.Date expiration, long arrowColor) throws ErrInvalidFunctionParamvalue, ErrCustomIndicatorError, ErrStringParameterExpected, ErrIntegerParameterExpected, ErrUnknownSymbol, ErrInvalidPriceParam, ErrTradeNotAllowed, ErrLongsNotAllowed, ErrShortsNotAllowed, ErrCommonError, ErrInvalidTradeParameters, ErrServerBusy, ErrOldVersion, ErrNoConnection, ErrTooFrequentRequests, ErrAccountDisabled, ErrInvalidAccount, ErrTradeTimeout, ErrInvalidPrice, ErrInvalidStops, ErrInvalidTradeVolume, ErrMarketClosed, ErrTradeDisabled, ErrNotEnoughMoney, ErrPriceChanged, ErrOffQuotes, ErrRequote, ErrOrderLocked, ErrLongPositionsOnlyAllowed, ErrTooManyRequests, ErrTradeTimeout2, ErrTradeTimeout3, ErrTradeTimeout4, ErrTradeModifyDenied, ErrTradeContextBusy, ErrTradeExpirationDenied, ErrTradeTooManyOrders
symbol
- Symbol for trading.cmd
- Operation type. It can be any of the Trade operation enumeration.volume
- Number of lots.price
- Preferred price of the trade.slippage
- Maximum price slippage for buy or sell orders in points.stoploss
- StopLoss level.takeprofit
- TakeProfit level.comment
- Order comment text. Last part of the comment may be changed by server.magic
- Order magic number. May be used as user defined identifier.expiration
- Order expiration time (for pending orders only).arrowColor
- Color of the arrow on the chart. If the parameter is missing or has CLR_NONE value closing arrow will not be drawn on the chart.
ErrInvalidFunctionParamvalue
ErrCustomIndicatorError
ErrStringParameterExpected
ErrIntegerParameterExpected
ErrUnknownSymbol
ErrInvalidPriceParam
ErrTradeNotAllowed
ErrLongsNotAllowed
ErrShortsNotAllowed
ErrCommonError
ErrInvalidTradeParameters
ErrServerBusy
ErrOldVersion
ErrNoConnection
ErrTooFrequentRequests
ErrAccountDisabled
ErrInvalidAccount
ErrTradeTimeout
ErrInvalidPrice
ErrInvalidStops
ErrInvalidTradeVolume
ErrMarketClosed
ErrTradeDisabled
ErrNotEnoughMoney
ErrPriceChanged
ErrOffQuotes
ErrRequote
ErrOrderLocked
ErrLongPositionsOnlyAllowed
ErrTooManyRequests
ErrTradeTimeout2
ErrTradeTimeout3
ErrTradeTimeout4
ErrTradeModifyDenied
ErrTradeContextBusy
ErrTradeExpirationDenied
ErrTradeTooManyOrders
public int ordersHistoryTotal()
public double orderStopLoss() throws ErrNoOrderSelected
ErrNoOrderSelected
public int ordersTotal()
public double orderSwap() throws ErrNoOrderSelected
ErrNoOrderSelected
public java.lang.String orderSymbol() throws ErrNoOrderSelected
ErrNoOrderSelected
public double orderTakeProfit() throws ErrNoOrderSelected
ErrNoOrderSelected
public int orderTicket() throws ErrNoOrderSelected
ErrNoOrderSelected
public int orderType() throws ErrNoOrderSelected
ErrNoOrderSelected
public boolean isTradeContextBusy()
public boolean refreshRates()
public int accountStopoutLevel()
public int accountStopoutMode()
public int messageBox(java.lang.String text, java.lang.String caption, int flags)
text
- Text that contains the message to be displayed.caption
- Text to be displayed in the header of the dialog box. If this parameter is NULL, the expert name will be displayed in the header.flags
- Flags that determine the type and behavior of the dialog box (see enumeration class MessageBoxFlag). They can represent a conbination of flags from the following groups.
public int uninitializeReason()
public boolean isTradeAllowed()
public boolean isStopped()
public boolean isOptimization()
public boolean isLibrariesAllowed()
public boolean isDllsAllowed()
public boolean isExpertEnabled()
public double accountFreeMarginCheck(java.lang.String symbol, TradeOperation cmd, double volume)
symbol
- Symbol for trading operation.cmd
- Operation type. It can be either OP_BUY or OP_SELL.volume
- Number of lots.
public double accountFreeMarginMode()
public int accountLeverage()
public java.lang.String accountServer()
public java.lang.String terminalCompany()
public java.lang.String terminalName()
public java.lang.String terminalPath()
public void alert(java.lang.String arg)
arg
- Any value.public void playSound(java.lang.String filename)
filename
- Path to the sound file.public java.lang.String objectDescription(java.lang.String name)
name
- Object name.
public int objectFind(java.lang.String name)
name
- Object name to search for.
public int objectGetShiftByValue(java.lang.String name, double value)
name
- Object name.value
- Price value.
public double objectGetValueByShift(java.lang.String name, int shift)
name
- Object name.shift
- Bar index.
public boolean objectMove(java.lang.String name, int point, java.util.Date time1, double price1)
name
- Object name.point
- Coordinate index (0-2).time1
- New time value.price1
- New price value.
public java.lang.String objectName(int index)
index
- Object index in the objects list. Object index must exceed or equal to 0 and be less than ObjectsTotal().
public int objectsDeleteAll(int window, int type)
window
- Index of the window in which the objects will be deleted. Must exceed or equal to -1 (EMPTY, the default value) and be less than WindowsTotal().type
- An object type to be deleted. It can be any of the Object type enumeration values or EMPTY constant to delete all objects with any types.
public double iIchimoku(java.lang.String symbol, Timeframe timeframe, int tenkan_sen, int kijun_sen, int senkou_span_b, IchimokuSource mode, int shift) throws ErrUnknownSymbol
symbol
- Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.tenkan_sen
- Tenkan Sen averaging period.kijun_sen
- Kijun Sen averaging period.senkou_span_b
- Senkou SpanB averaging period.mode
- Source of data. It can be one of the Ichimoku Kinko Hyo mode enumeration.shift
- Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
ErrUnknownSymbol
public void hideTestIndicators(boolean shift)
shift
- TRUE, if there is a need to hide indicators, or else FALSE.public int period()
public java.lang.String symbol()
public int windowBarsPerChart()
public int windowFirstVisibleBar()
public java.lang.String windowExpertName()
public int windowFind(java.lang.String name)
name
- Indicator short name.
public boolean windowIsVisible(int index)
index
- Chart subwindow index.
public double windowPriceMax(int index)
index
- Chart subwindow index (0 - main chart window).
public double windowPriceMin(int index)
index
- Chart subwindow index (0 - main chart window).
public int windowOnDropped()
public int windowXOnDropped()
public int windowYOnDropped()
public double windowPriceOnDropped()
public java.util.Date windowTimeOnDropped()
public int windowsTotal()
public void windowRedraw()
public boolean windowScreenShot(java.lang.String filename, int sizeX, int sizeY, int startBar, int chartScale, int chartMode)
filename
- Screen shot file name.sizeX
- Screen shot width in pixels.sizeY
- Screen shot height in pixels.startBar
- Index of the first visible bar in the screen shot. If 0 value is set, the current first visible bar will be shot. If no value or negative value has been set, the end-of-chart screen shot will be produced, indent being taken into consideration.chartScale
- Horizontal chart scale for screen shot. Can be in the range from 0 to 5. If no value or negative value has been set, the current chart scale will be used.chartMode
- Chart displaying mode. It can take the following values: CHART_BAR (0 is a sequence of bars), CHART_CANDLE (1 is a sequence of candlesticks), CHART_LINE (2 is a close prices line). If no value or negative value has been set, the chart will be shown in its current mode.
public int windowHandle(java.lang.String symbol, Timeframe timeframe)
symbol
- symbol name.timeframe
- Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |