Expert Advisors and Automated Trading - page 107

Dear technical team I have an EA which is working on my local pc but when i migrate it to vps its not opening closing trades EA is very simple and small and not using or calling any DLL files. i checked vps journel and found these error lines showed in screen shot. please advise what to do thank you
Me and a couple other people experience a bug where the forward test results are incorrect. In order to see how well a pass actually did I have to manually run a single test on it. It isn't possible for me to manually check thousands of passes. I am wondering if I could automate it or is there a way
Hey guys! I have been facing some issues adding commission for the metals assets, mainly gold and silver . Can I ask if anyone might know what I have been doing wrong? Thanks in advance! P.S Snapshots below illustrates the issues better
In strategy testing, after the order has reached SL, then an opposite order is created, can this be prevented
Hello Programmers I am in the middle of programming my own EA. I'm not very experienced, so was wondering if someone could help me out here. In my EA, I first declare a long breakout like this: int longBreakout = 0; When my Buy Stop Order gets filled I want the value of 1 to be assigned to the
  Macro-bug since MT5-Update?  (17   1 2)
Dear MetaQuotes and affiliates, thank you for making MetaTrader! However, to my great dismay, I just noticed that the following code, specifically the macro definition... #define isNew(var, ID) isChanged ##ID(var) ...which still worked on 2nd August 2023, today no longer works (compiles)! ## ...is
  Help pls, EA  (3)
Hello traders, I'm building an EA, How can I get the difference between the initial tick and the current tick at a given time
void Close_position_withDistance2( double distance_) { double open_price = 0 ; datetime last_position_time = 0 ; for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) { ulong position_ticket = PositionGetTicket (i); double bid = SymbolInfoDouble ( Symbol (), SYMBOL_BID );
Is SymbolIsSynchronized returning true when the symbol on the terminal has the latest bar similar to the trade server or if it has "chart bars" data similar to the trade server
Hello im new to coding this is how it should work, there are 2 MA´s, one with Period 5 and the larger one with Period 50 if them are crossing each other i want to open a long or a short Position. that were my thoughts about the entry now the close of the positions i want to use the Rsi for example...
i'd like to make my EA to close a position if any of these conditions were met : -profit on the position is 100 points -price hit RSI 30 OR 70 depending if it's a Sell or buy Here's my code but for some reason it doesn't work !! Also i'm not quite sure whether "PositionGetDouble " return profit
  suffix .a  (4)
My broker has said that the currency pairs have a suffix .a requirement. This is IC Markets. I am wondering IF anyone can tell me what I need to do to change my code to work in their system. Otherwise I will have to find a new broker
I tried to make an EA based on Ichimoku Clouds and soon ran into a silly mistake. When all the conditions are met, the EA opens a trade. For example, long. If you're familiar with Ichimoku Clouds, you know what those conditions are. So the trade hits take profit and closes the trade. And guess what
I'd like to use CHARTEVENT_KEYDOWN with the event handler OnChartEvent(), To detect keystrokes and assign them to functions, I'm noticing that the keys are not the same depending on the type of keyboard used in Windows (AZERTY / QWERTY / QWERTZ) and also the lparam codes. How do you manage this type
  Trade History  (2)
Hi, please can anyone help me with the correct code to get the Deal Entry Price? HistorySelect ( 0 , TimeCurrent ()); //--- create objects string name; uint total= HistoryDealsTotal (); ulong ticket= 0 ; double price; double profit; datetime time; string symbol;
I am trying to follow the code this person is providing in his example (Code pasted below) #include<Trade\Trade.mqh> Ctrade trade; input int SmallMovingAverage= 20 ; input int BigMovingAverage= 50 ; void OnTick () { // Calculate Ask price double Ask= NormalizeDouble ( SymbolInfoDouble
Hello everyone I write a bot and save it with name test.mql5 and compile was successfully and the test.ex5 created too. the file is exist in Experts folder but when I want to start backtesting in Journal tab says the file not found what is the problem
[Deleted]
where i can create an Expert Advisor with my own strategy
hi i want list or find all wParam in PostMessageA for MT5 ? any want can help me
As the title, TimeDaylightSavings() doesn't work when I run backtest for a year, it always Print out "true". Expected: I want to detect the time while running the backtest is considered daylight saving time or not int OnInit () { //--- trade.SetExpertMagicNumber( 1 ); //--- return (
Getting this error in MT5 backtesting. Plz help to fix it. Plz let me know if i need to provide more details. IM 0 11:49:25.084 Core 1 2023.01.04 01:28:01 OrderSelect( 37183, SELECT_BY_POS, MODE_HISTORY ) - Error #4755
Hello everyone! I've found a pretty good system that makes solid trades on the H1 time frame EUR/USD. Now, all it needs is an EA to stack some serious cheese! Here it is: MACD: Fast-5 Slow-12 Signal-100 RSI: 21 Period If the RSI is above 50, look only for longs, if it is below 50, look only to go...
Hello, I am using pending orders in my EA and need they expire today if not activated. but in strategy tester the pending orders will not expired and still remain pending orders in terminal tab. What is the problem here ? how can be resolved ? My code is as below. void placeOrder( ENUM_ORDER_TYPE
Hello, I am currently building an EA and it uses data from an external file, the problem is that when running a single test each time it has to re-read that data file. The question is, is it possible to retrieve data once and save it somewhere to use for running slow complete optimization test
Hey all, pulling my hair out trying to work out why my EA will only perform one trade on backtest and wont open another afterwards even though I can see conditions are met. Good someone kindly point me in the right direction. #include <Trade\Trade.mqh> #property copyright "Copyright 2022, MetaQuotes
  Error in my code  (1)
The EA is supposed to buy when the previous candle was bullish and sell if the previous candle was bearish. input double takeProfitPips = 100 ; // Take Profit (in pips) input double stopLossPips = 100 ; // Take Profit (in pips) input double lot = 0.1 ; datetime LastActionTime = 0 ;
I want to have a code to allow only one position waiting for my code Improperly formatted code removed by moderator
Hello all, I'm trying to set order with EA and get an error invalid stops Order type: OP_SELLSTOP Price: 1.066960 SL: 1.068760 TP: 0.000000 Bid = Ask at the moment of the operation and they are 1.067200 Stop Level of the pair is 0.00000 Can some one help me to understand what's going wrong with it
Hello, good day, I would like to know if there is any other way to connect Metatrader 5 with C# without using .dll, or shared files(but this is too slow) or TCP/IP connection. I have read that there is documentation for integration with Python, but I have not found information for integration with
Hello. I am new to Forex, MQL and MT5. I subscribed to a signal and so far it's doing well. But, the trade size is tiny. The profits have been under a dollar. How to I change the size of the trade. I don't where I can adjust the trade size.? Thanks in advance for any help