本文整理汇总了C#中this.CallMqlMethod方法的典型用法代码示例。如果您正苦于以下问题:C# this.CallMqlMethod方法的具体用法?C# this.CallMqlMethod怎么用?C# this.CallMqlMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类this
的用法示例。
在下文中一共展示了this.CallMqlMethod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Open
public static double Open(this MqlHandler handler, int i)
{
return Convertor.ToDouble(handler.CallMqlMethod("Open", new object[1]
{
(object) i
}));
}
示例2: SendNotification
public static bool SendNotification(this MqlHandler handler, string notification)
{
return Convertor.ToBoolean(handler.CallMqlMethod("SendNotification", new object[1]
{
(object) notification
}));
}
示例3: Print
public static void Print(this MqlHandler handler, string message)
{
handler.CallMqlMethod("Print", new object[1]
{
(object) message
});
}
示例4: PlaySound
public static void PlaySound(this MqlHandler handler, string filename)
{
handler.CallMqlMethod("PlaySound", new object[1]
{
(object) filename
});
}
示例5: OrderClose
/// <summary>
/// Closes opened order. If the function succeeds, the return value is true. If the function fails, the return value is false. To get the detailed error information, call GetLastError().
/// </summary>
/// <param name="handler"></param>
/// <param name="ticket">Unique number of the order ticket.</param>
/// <param name="lots">Number of lots.</param>
/// <param name="price">Preferred closing price.</param>
/// <param name="slippage">Value of the maximum price slippage in points.</param>
/// <param name="color">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.</param>
/// <returns></returns>
public static bool OrderClose(this MqlHandler handler, int ticket, double lots, double price, int slippage,
int color = 0)
{
string retrunValue = handler.CallMqlMethod("OrderClose", ticket, lots, price, slippage, color);
return Convertor.ToBoolean(retrunValue);
}
示例6: OrderReliableLastErr
public static int OrderReliableLastErr(this MqlHandler handler)
{
string returnValue = handler.CallMqlMethod("OrderReliableLastErr", null);
try
{
return Convertor.ToInt(returnValue);
}
catch (Exception)
{
return 0;
}
}
示例7: Print
/// <summary>
/// Prints a message to the experts log. Parameters can be of any type.
/// </summary>
/// <param name="handler"></param>
/// <param name="message"> </param>
public static void Print(this MqlHandler handler, string message)
{
string retrunValue = handler.CallMqlMethod("Print", message);
}
示例8: MarketInfo
/// <summary>
/// Returns various data about securities listed in the Market Watch window.
/// </summary>
/// <param name="handler"></param>
/// <param name="symbol"></param>
/// <param name="mode"></param>
/// <returns></returns>
public static double MarketInfo(this MqlHandler handler, string symbol, MARKER_INFO_MODE mode)
{
string retrunValue = handler.CallMqlMethod("MarketInfo", symbol, (int) mode);
return Convertor.ToDouble(retrunValue);
}
示例9: AccountFreeMarginCheck
/// <summary>
/// Returns free margin that remains after the specified position has been opened at the current price on the current account. If the free margin is insufficient, an error 134 (ERR_NOT_ENOUGH_MONEY) will be generated.
/// </summary>
/// <param name="handler"></param>
/// <param name="symbol"></param>
/// <param name="cmd"></param>
/// <param name="volume"></param>
/// <returns></returns>
public static double AccountFreeMarginCheck(this MqlHandler handler, string symbol, ORDER_TYPE cmd,
double volume)
{
string retrunValue = handler.CallMqlMethod("AccountFreeMarginCheck", symbol, (int) cmd, volume);
return Convertor.ToDouble(retrunValue);
}
示例10: AccountCurrency
/// <summary>
/// Returns currency name of the current account.
/// </summary>
/// <param name="handler"></param>
/// <returns></returns>
public static string AccountCurrency(this MqlHandler handler)
{
string retrunValue = handler.CallMqlMethod("AccountCurrency", null);
return retrunValue;
}
示例11: AccountServer
/// <summary>
/// Returns the connected server name.
/// </summary>
/// <param name="handler"></param>
/// <returns></returns>
public static string AccountServer(this MqlHandler handler)
{
string retrunValue = handler.CallMqlMethod("AccountServer", null);
return retrunValue;
}
示例12: WindowFind
/// <summary>
/// If indicator with name was found, the function returns the window index containing this specified indicator, otherwise it returns -1.
/// </summary>
/// <param name="handler"></param>
/// <param name="name"></param>
/// <returns></returns>
public static int WindowFind(this MqlHandler handler, string name)
{
string retrunValue = handler.CallMqlMethod("WindowFind", name);
return Convertor.ToInt(retrunValue);
}
示例13: HideTestIndicators
/// <summary>
/// The function sets a flag hiding indicators called by the Expert Advisor.
/// </summary>
/// <param name="handler"> </param>
/// <param name="hide"></param>
public static void HideTestIndicators(this MqlHandler handler, bool hide)
{
string retrunValue = handler.CallMqlMethod("HideTestIndicators", hide ? 1 : 0);
}
示例14: WindowPriceOnDropped
/// <summary>
/// Returns the price part of the chart point where expert or script was dropped.
/// </summary>
/// <param name="handler"></param>
/// <returns></returns>
public static double WindowPriceOnDropped(this MqlHandler handler)
{
string retrunValue = handler.CallMqlMethod("WindowPriceOnDropped");
return Convertor.ToDouble(retrunValue);
}
示例15: WindowPriceMin
/// <summary>
/// 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).
/// </summary>
/// <param name="handler"></param>
/// <param name="index"></param>
/// <returns></returns>
public static double WindowPriceMin(this MqlHandler handler, int index = 0)
{
string retrunValue = handler.CallMqlMethod("WindowPriceMin", index);
return Convertor.ToDouble(retrunValue);
}