//============================================================================= // LibOrderReliable.mqh // // Copyright © 2006, Matthew Kennel // mbkennelfx@gmail.com // Copyright © 2007, Derk Wehler // DerkWehler@gmail.com // // Header File for library: LibOrderRelaible.mq4 // // CURRENT REVISION STATUS (Inserted by SOS): // |$Workfile:: LibOrderReliable.mqh $| // |$Revision:: 9 $| // |$Author :: Derk $| // |$Date :: 12/21/07 4:18p $| // // *************************************************************************** // *************************************************************************** // LICENSING: This is free, open source software, licensed under // Version 2 of the GNU General Public License (GPL). // // In particular, this means that distribution of this software in a binary // format, e.g. as compiled in as part of a .ex4 format, must be accompanied // by the non-obfuscated source code of both this file, AND the .mq4 source // files which it is compiled with, or you must make such files available at // no charge to binary recipients. If you do not agree with such terms you // must not use this code. Detailed terms of the GPL are widely available // on the Internet. The Library GPL (LGPL) was intentionally not used, // therefore the source code of files which link to this are subject to // terms of the GPL if binaries made from them are publicly distributed or // sold. // // ANY USE OF THIS CODE NOT CONFORMING TO THIS LICENSE MUST FIRST RECEIVE // PRIOR AUTHORIZATION FROM THE AUTHOR(S). ANY COMMERCIAL USE MUST FIRST // OBTAIN A COMMERCIAL LICENSE FROM THE AUTHOR(S). // // Copyright (2007), Derk Wehler, derkwehler@gmail.com // *************************************************************************** // *************************************************************************** // //============================================================================= #property copyright "Copyright © 2007, Derk Wehler, Matt Kennell" #property link "derkwehler@gmail.com" #import "LibOrderReliable.ex4" int OrderSendReliable(string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, datetime expiration = 0, color arrow_color = CLR_NONE); int OrderSendReliableMKT(string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, datetime expiration = 0, color arrow_color = CLR_NONE); int OrderSendReliable2Step(string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment, int magic, datetime expiration = 0, color arrow_color = CLR_NONE); bool OrderModifyReliable(int ticket, double price, double stoploss, double takeprofit, datetime expiration, color arrow_color = CLR_NONE); bool OrderCloseReliable(int ticket, double volume, double price, int slippage, color arrow_color = CLR_NONE); bool OrderCloseReliableMKT(int ticket, double volume, double price, int slippage, color arrow_color = CLR_NONE); bool OrderDeleteReliable(int ticket); int OrderReliableLastErr(); string OrderReliableErrTxt(int err); void OrderReliableSetErrorLevel(int level); void OrderReliablePrint(string s); string OrderReliable_CommandString(int cmd); void OrderReliable_EnsureValidSL(string symbol, double price, double& sl); void OrderReliable_EnsureValidTP(string symbol, double price, double& tp); void OrderReliable_SleepRandomTime(double mean_time, double max_time); string OrderType2String(int type); void LimitToMarket(bool limit2market); void OrderReliableAddSpreadToComment(bool use); void OrderReliableUseForTesting(bool use);