Expert Advisors and Automated Trading - page 116

account_info is work orders_get not work output No open orders found import MetaTrader5 as mt5 import requests from datetime import datetime # start the platform with initialize() if not mt5.initialize(): print( "initialize() failed, error code =" ,mt5.last_error()) quit() # login to Trade
i dont know why but its was wokring fine and i try multiple time too so only magic key other thing if i try to attach it will work
Hello community, I am new to FOREX, EA's, and MT5. I have been running a lot of backtests using [name redacted] EA, with amazing results changing the configuration. I have a demo account with the broker and I use a balance of $1000 doing the backtesting. Every time the test is finished, for example
Hey all, My EA is not entering trades on my VPS. I have the right currency pair, which in this case is GBPUSDx, but my journal logs from the VPS is showing GBPUSD, so I don't know if this is the reason the EA is not entering trades. I can't change any settings in the EA to point to the broker
The MQL5 architecture application is event-based, i.e., the EA is a client waiting for server signal of a tick, time, trade or transaction event . So, the code is organized to wake and respond well defined events in a self coordinated chuncks of code. Well, how can I get the equivalent behavior on
Hello i need help am trying to detect a spike on boom 1000 , i have noted that a spike is also there same as a bullish candle on the boom 1000 i have tried to detect this and count each occurance , the code runs without errors but i cant cant seem to detect anything can anyone help me. string bull=
[Deleted]
Hello I hope the MQL5 forum can help me out, My Back tests in Strategy Tester for my MT5 EA, have been flawless, fast optimization (168 tests), ‘fast Open Prices only’ Single Tests , ‘Every Tick based on real ticks’ decent results, stop losses, Take profit and lot sizes, have all been correct over 5
Is there a way to fix this? I have tried resolution variations but didnt work
Hello, I made some tests with EA optimization option as "All Symbols Selected in Marketwatch" . In this option, the system backtest EA with all symbols in the marketwatch with reports in optimization result. But the problem is that almost all backtest results are incorrect with big differences
Hi everyone, I have always noticed a problem related to the optimization of the strategy on all symbols. Almost always the results obtained in the report of a symbol were different than the single execution on that symbol. I never explained why and it forced me not to be able to take advantage of
Hi All, using the optimization "All Symbols selected in MarketWatch" I noticed some different values between the Optimization Result related to one symbol and a "Test Run" for the same symbol. For example, the optimization results for my EA on the stock "ENI" is a profit of 541.64 EUR; after running
  CopyBuffer error  (1)
Hi, i want to call the most recent RSI value in the OnTick for multiple symbols although im currently getting the following error: 'CopyBuffer' - no one of the overloads can be applied to the function call. What's the solution? string symbol_loop[] = { "USDJPY" , "EURUSD" , "USDCAD" , "GBPUSD" };
Hi, I just got a new EA and it made a trade that I personally would never make. Maybe I am missing something but can someone tell if my EA made a good call and I am missing something or my EA is just not setup properly. ( it bought at the last peak on the screenshot.)
[Deleted]
I'm trying to put multiple strategies within a single EA. How to manage orders in this case? Is it possible for me to select the order via COMMENT and manage it from there? Is it possible for me to define a global variable TICKET_01, TICKET_02, etc. and whenever I open an order or an operation
Hi, i have written a code in mt4 and trying to make the same ea in mt5. However, i am having trouble converting it to mt5. Thank you in advance in helping me. dont know how to close the trade in mt5. Thanks void OnTick () { //curent chart, current period, 20 candles,no shift, simple, close
I need someone who can help me to create a new signal indicator by combining MACD indicator, Fibonacci indicator, EMA 10,30 AND ema 200. MACD must appear on the indicator's window and the other EMAs must appear on the main chart window. This signal indicator will use MACD histogram to find main
Hi. I used to trade only forex , and i was using this part of the code to find out how many pips is the stop loss, and if it was more than 300 pip then i entered the trade. //to find the stop value i use fibonacci. double SymPoint= 0 ; if ( SymbolInfoInteger (thissymbol, SYMBOL_DIGITS ) == 3 )
Greets, I've been trying my hand at writing MQL5 EAs for a while now and everything works as expected. I've always used the strategy tester on intra-day timeframes, but recently decided to give the Daily TF a try. Problem is the strategy tester always fails to place any test trades because the
Hi Everyone, I am performing a slow complete algorithm optimisaiton on an EA. The EA contains a boolean which if activated returns INIT_PARAMETERS_INCORRECT in the OnInit function when invalid combinations of parameters are encountered by the tester. (E.g. no stoploss + stoploss = 10 pips). The
How could one create a connection between MT5 EA and execute trades accordingly on binary broker like PocketOption I have MT2 trading connector working but it only has few brokers available. As PocketOption has feature of hotkey trading from keyboard alone. I even considered simulating button
Hello everyone so in this EA i have tried to detect a squeeze by subtracting the values of the upperband and the lowerband then dividing by the middle band to get the bandwidth i then created a squeezethreshold of 2% and check if the bandwidth value is below the squeeze threshhold if it is then i
Hi all, Mostly posting this in case someone else runs into this issue, this may fix the error in the title. I started from a fresh install of MT5, and upon trying to run a python script, the python Initialize function would produce " -10003, 'IPC initialize failed, MetaTrader 5 x64 not found' "
>>> lot = 0.1 >>> point = mt5.symbol_info(symbol).point >>> price = mt5.symbol_info_tick(symbol).ask >>> point 1 e- 05 >>> price 77.057 >>> deviation = 20 >>> request = { ... "action": mt5. TRADE_ACTION_DEAL , ... "symbol": symbol, ... "volume": lot, ... "type": mt5. ORDER_TYPE_BUY
Hi, I want to set an input parameter using INI file. For a single symbol it works find but I want to use it for multi-currency purpose. Here's the code that I use, input string InpSettingsFile = "Lybra/Test/external file.ini" ; //input file name, blank = not used int StoplossPoint
Hey guys, I tried to understand that and even used ChatGPT for it but still couldn't what is the difference between Equity Drawdown Maximal and Equity Drawdown Relative in this report and what should I really care about as an investor
hi dear.s i want a traling stop code for mql 5 . i want be nice
hi ive created this perfect pivot point object but im having trouble converting this code into one which creates rectangles to represent zones of potential support and resistance. Ive attached two EAs, one which creates the lines perfectly whilst the other is supposed to make zones but doing so
Hi i have an issue retrieving data. The EA prints the valid figures requested in the print function yet when it comes to the EURUSD, the EA suddenly thinks the low, high, open and close are the same value. In the following picture you'll see the same thing as i've just described yet the candlestick
hi, this is rather odd but ive noticed my MT5 settings when running an EA simply does not change when i make certain adjustments. For example, if i change the Bollinger Band Std from 1 to 4, the only chart visual bands do not change as ive seen them do. This is impact the results from when i print
Hi all, A pending order was issued at 10am with a target price of X. At 11am price reached X so the pending order becomes a market order. Question is how to prevent that if current Spread is above a certain value? Any idea