metatrader5

How to use CopyRates() to search and filter through several timeframes for Bullish Engulfing pattern

北慕城南 提交于 2020-07-01 10:43:24
问题 The bounty expires tomorrow . Answers to this question are eligible for a +100 reputation bounty. SuperHueman wants to draw more attention to this question: To receive this bounty, a user should provide tested code on finding all bullish engulfing patterns on timeframes H2 to M10 within a bullish H4 candle using CopyRates(). From the found bullish engulfing patterns the one with the highest bearish to bullish candle body ratio should by filtered out searching through with CopyRates(). Note

How Close an MT5 Order from Python?

删除回忆录丶 提交于 2020-06-26 14:33:18
问题 I'm trying to send orders from a python script to my MT5 terminal via the MT5-python API. I can open a position but how can I close it from Python mt5-API? I open a BUY ticket it like this: import MetaTrader5 as mt5 lot = 0.1 request = { "action": mt5.TRADE_ACTION_DEAL, "symbol": symbol, "volume": lot, "type": mt5.ORDER_TYPE_BUY, "price": price, ..... "type_time": mt5.ORDER_TIME_GTC, "type_filling": mt5.ORDER_FILLING_RETURN, } enter copoint = mt5.symbol_info(symbol).point But what command and

How to search for a candlestick pattern on multiple timeframes

懵懂的女人 提交于 2020-06-21 05:26:06
问题 I have an expert advisor that draws rectangle on a specifically defined bearish pinbar followed by a bullish candle. Please see the code below. It basically shows the rectangle on the timeframe displayed on the chart. How can I search for this candlestick pattern on timeframes within an H1 candlestick down to M2 in such a way that I can filter the pattern that has the longest bearish pinbar from all timeframes? string prefix="PBar"; int magicnumber = 12345; bool drawBearPinbarRectangle(int

Converting mql4 EA to mql5

泄露秘密 提交于 2020-04-07 03:20:31
问题 I have been trying to figure out how to change my MQL4 code to MQL5. So far I've been able to change the RSI and MACD conditions and SendOrder() but there's a lot, like the ModifyOrder() and CloseOrder() amongst other stuff that I've not been able to do to complete it. I know this is a mouthful but I would really appreciate some help in completing this. This is the original MQL4 code: extern int MagicNumber=112223; extern double Lots =0.005; extern double StopLoss=0; extern double TakeProfit

Converting mql4 EA to mql5

对着背影说爱祢 提交于 2020-04-07 03:20:28
问题 I have been trying to figure out how to change my MQL4 code to MQL5. So far I've been able to change the RSI and MACD conditions and SendOrder() but there's a lot, like the ModifyOrder() and CloseOrder() amongst other stuff that I've not been able to do to complete it. I know this is a mouthful but I would really appreciate some help in completing this. This is the original MQL4 code: extern int MagicNumber=112223; extern double Lots =0.005; extern double StopLoss=0; extern double TakeProfit

How to call a function from a DLL file from [ MQL5 ] code?

Deadly 提交于 2019-12-23 02:38:07
问题 Why the first MessageBox() works and the second doesn't? I don't know where the problem is. Does the MQL5 can access the dll file? I need to to call C# functions that read JSON . No errors appear in MetaEditor . C# .dll file: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; namespace TestMe { class Test { // [DllExport("Add", CallingConvention = CallingConvention.StdCall)] public static

Integrating the OHLC value from Python API to MT5 using MQL5

别等时光非礼了梦想. 提交于 2019-12-22 09:42:39
问题 I have obtained the OHLC values from the iqoption and trying to find out a way to use it with MT5. Here is how I got the values: import time from iqoptionapi.stable_api import IQ_Option I_want_money=IQ_Option("email","password") goal="EURUSD" print("get candles") print(I_want_money.get_candles(goal,60,111,time.time())) The above code library is here: iqoptionapi The line: I_want_money.get_candles(goal,60,111,time.time()) output json as : Output of the command Now I am getting json in the

isNewBar() not producing the right time Stochastic value onTick MQL5

£可爱£侵袭症+ 提交于 2019-12-10 00:21:48
问题 Check this program I am trying to get the values of the Stochastic #include <Lib CisNewBar.mqh> CisNewBar current_chart; // instance of the CisNewBar class: // detect new tick candlestick void OnTick() { if ( current_chart.isNewBar() > 0 ) { int stoch = iStochastic(_Symbol,PERIOD_M1,5,3,3,MODE_SMA,STO_LOWHIGH); double K[],D[]; ArraySetAsSeries(K,true); ArraySetAsSeries(D,true); CopyBuffer(stoch,0,0,5,K); CopyBuffer(stoch,1,0,5,D); ArrayPrint(K); } } Here is the output I got: 95.97315 90.40000