Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // hyrGlobal.mqh
- // by 2025-2026 (c)hyrolean
- //---------------------------------------------------------------------------
- // Local:: <DataFolder>\MQLx\Include\User\hyrGlobal.mqh
- // URL:: https://pastebin.com/2PdBW6NQ
- //===========================================================================
- #include <User/hyrDefs.mqh> // https://pastebin.com/iHZKAWqC
- #ifdef __MQL5__
- #import "User/hyrGlobal.ex5" // https://pastebin.com/Lw82F2MN
- #else
- #import "User/hyrGlobal.ex4" // https://pastebin.com/hk9XfDiv
- #endif
- //---------------------------------------------------------------------------
- //グローバル変数の設定
- void GlobalSettings(
- string entryName,
- int maxSlippage=10,
- int maxSpread=50,
- int orderRetry=10,
- int orderRetrySleep=100,
- uint orderRetryDuration=1000 );
- #ifdef __MQL4__
- //注文の色設定
- void OrderColorSetting(
- color colLongArrow=clrBlue,
- color colShortArrow=clrRed );
- #endif
- //エラーログ出力
- void PrintLastError(string sender="");
- //メッセージ出力
- void PrintMessage(string message, string sender="");
- //vとcompの距離が1Pointのサイズに収まっているかどうか
- bool InnerPoint(double v, double comp);
- //基軸時間の現在時刻を返す
- datetime BaseTime(ENUM_TIMEBASE TimeBase);
- //マーケットで扱えるようにロットサイズを補正して返す
- double AdjustMarketLots(double lots);
- //すでに注文済みかどうか
- FLAG AlreadyOrdered(FLAG orderFlag, MAGIC magic=-1);
- //注文の発注
- TICKET MakeOrder(OP entryType, double lots, double sl, double tp, string detector,
- MAGIC magic, double entryPrice=0.0, datetime expiration=0);
- //注文発注サブルーチン
- TICKET MakeOrderSub(OP entryType, double entryPrice, double lots, double sl=0.0, double tp=0.0,
- string comment=NULL, MAGIC magicNumber=0, datetime expiration=0, color orderColor=clrNONE);
- #ifdef __MQL5__
- //リミット価格付き逆指値注文の発注
- TICKET MakeOrderStopLimit(double stopPrice, double limitPrice, double lots,
- double sl, double tp, string detector, MAGIC magic, datetime expiration=0);
- #endif
- //発注済オーダーのStoplossとTakeprofitの変更
- bool ModifyOrderSlTp(TICKET ticket, double sl, double tp);
- //発注済予約注文の取消
- bool WithdrawOrder(TICKET ticket, color orderColor=clrNONE);
- //注文の決済
- bool CheckoutOrder(OP orderType, TICKET orderTicket, double orderLots);
- //注文の全決済
- bool CheckoutOrderAll(FLAG orderFlag, MAGIC magic=-1, double lotsDenom=1.0);
- //時間動作制御(戻り値: 非0=アクティブ時間)
- bool ControlTimeAction(
- datetime TimeTick, datetime TimeStart, datetime TimeEnd,
- datetime &NextStartTime, MAGIC magic=-1, ENUM_TIMEACT TimeAction=TIMEACT_NONE);
- //000,000,000表示
- string DoubleToAmount(double inputdata, int dig);
- //---------------------------------------------------------------------------
- #import
Advertisement
Add Comment
Please, Sign In to add comment