PositionSelect 为接下来的工作选择一个仓位,如果函数成功完成,返回true,如果失败返回false,调用GetLastError()函数获取错误信息。 boolPositionSelect( stringsymbol// 交易品种名称 ); 参量 交易品种 [in] 金融证券名称 返回值 布尔型值 注释 对于每个交易品种,任何给出时间,仅可以持有一个仓位,它是一个或者多个交易...
(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties { if(TimeCurrent()-m_position.Time()>=m_after) m_trade.PositionClose(m_position.Ticket()); // close a position } } //+---+ //+---+ //| called when a Trade event arrives |...
I'm hoping someone else has experienced this issue. I'm new to MQL5 (coming from pinescript) and finding my way around the language. Following the guidelines of the documentation, it's recommended to callPositionSelect()before callingPositionGetInteger(), eg: int openPositions(ENUM_POSITION_TYP...
if(position.SelectByIndex(i)&&position.Symbol()==Symbol()) { ENUM_POSITION_TYPEtype=position.PositionType(); doubleCurrentSL=position.StopLoss(); doubleCurrentTP=position.TakeProfit(); doubleCurrentPrice=position.PriceCurrent(); if(type==POSITION_TYPE_BUY) ...
SetDouble设置双精度型指标行属性值自定义指标PlotIndexSetInteger设置整型指标行属性值自定义指标PlotIndexSetString设置字符串指标行属性值自定义指标Point返回报价货币当前交易品种的点大小检测PositionGetDouble返回持仓要求属性(双精度)交易函数PositionGetInteger返回持仓要求属性(日期时间或者整型)交易函数PositionGetString返回...
Before opening a position for any instrument. The best I could find - and it was in MQL4 - was AFTER having a position open: for ( int pos = total - 1 ; pos >= 0 ; pos--) { if ( OrderSelect (pos, SELECT_BY_POS)) { posCommission = OrderCommission(); break ; } } I'd ...
MQL5 中文手册 老易 yiwence@ 2010/12/11 目录 1 语言基础14 1.1 语法14 1.1.1 注释15 1.1.2 标识符15 1.1.3 关键词15 1.2 数据类型16 1.2.1 整型数据17 1.2.2 字符型,短整型,整型和长整型18 1.2.3 字符常量20 1.2.4 日期时间型23 1.2.5 颜色型24 1.2.6 布尔类型25 1.2.7 枚举类型25 1.2....
Starting from build 1860, the MetaTrader 5 platform supports dynamic changes of viewed optimization results by switching various optimization criteria. This is close to OLAP idea. But for a complete analysis, we need the possibility to select many other slices of the hypercube. more... Share ...
Returns the ticket of the position with the specified index in the list of open positions OrdersTotal Returns the number of orders OrderGetTicket Return the ticket of a corresponding order OrderSelect Selects a order for further working with it ...
File.extern.h File.mqh ISerializable.h Indicator.define.h Indicator.enum.h Indicator.mqh Indicator.struct.cache.h Indicator.struct.h Indicator.struct.serialize.h IndicatorBase.h IndicatorData.enum.h IndicatorData.mqh IndicatorData.struct.h ...