datetime SetOrderExpirationTime( int halfhours) { return ( TimeCurrent () + halfhours * 1800 ); } bool BuyStop_Func( double volume, double orderprice, ulong slippage, double stopLoss, double takeProfit, ulong magicnumber) { MqlTradeRequest request = {}; MqlTradeResult result = {};
#import "Shell32.dll" int ShellExecuteW( int hWnd, string operation, string file, string parameters, string directory, int nCmdShow); #import string filepath = TerminalInfoString ( TERMINAL_DATA_PATH )+ "MQL5\\Files\\batchfile.bat" ; ShellExecuteW( 0 , "open" , filepath, "" , "" , 1 ); I
I would like to write a code in MQL5 that follows the mouse cursor, just like when you click on Fibo, channels, trend lines etc on MT5. When I used ObjectCreate , it will look like a point in the X and Y coordinates. Is there a function to create like Fibo crosshairs in MQL5? Also, is it possible to
I have problem from MQL4 I would like to get the price of the currency pair to directly, but the price to get depends on the currency pair to be introduced. How can I get the direct price? double USDJPY[]; ArraySetAsSeries (USDJPY, false ); int rates_usdjpy = iBars ( "USDJPY" , PERIOD_CURRENT );
I would like to display only the specified bars by RSI in order to lighten the indicator, but it is not displayed well. How to display RSI for only specified of bars? //+------------------------------------------------------------------+ //|
//+------------------------------------------------------------------+ //| Moving Averages.mq5 | //| Copyright 2009-2017, MetaQuotes Software Corp. | //| http://www.mql5.com |
TimeDay( TimeCurrent ())!= 1 &&TimeDay( TimeCurrent ())!= 2 &&TimeDay( TimeCurrent ())!= 3 &&TimeDay( TimeCurrent ())!= 4 &&TimeDay( TimeCurrent ())!= 5 TimeDay( TimeCurrent ())!=( 1 || 2 || 3 || 4 || 5 ) I want to write a code that does not entry date of 1, 2, 3, 4, 5, but the codes becomes long. I
Same Lots, but one is +198Points for + $ 62 and the other one is -37Points for-$ 95, why are the profits different
//+------------------------------------------------------------------+ //| Check for open order conditions | //+------------------------------------------------------------------+ void CheckForOpen() { double ma; int res; //--- go trading only for first
#property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 // --- Sell #property indicator_label1 "Sell" #property indicator_type1 DRAW_ARROW #property indicator_color1 clrAqua #property indicator_width1 1 input bool SELL_ARROW = true ; // --- Buy #property