Expert Advisors and Automated Trading - page 171

I need to send an int via socket, but the casts I'm using doesn't works. How to do it in MQL? I'm trying it like this. int buffer; SocketSend (socket, ( uchar *)&buffer, sizeof ( int )); Thank you so much
What is the string default value? I want to use a if statement on a string array default value. It's not EMPTY_VALUE, 0, ""(Empty String). Then What It Is? example string Array[]; ArrayResize (Array, 10 ); for ( int i= 0 ; i< ArraySize (Array); i++) { if ( Array[i]==( default value(I don't know
Hi There, I am tracking orders via ticket for the Hedging MT5 account. I noticed that the ticket that I was tracking was different from the ticket on the order for real accounts . Meanwhile for demo accounts, the ticket tracking is the same as the order ticket. Can anyone help explain why
Hi, can someone please clarify the name convention for bars in an array of type Open, Close, High, Low. If bar[0] is the current open bar on the chart, then how can it have a close price, since it's not closed yet? Or is bar[0] the last closed bar before the current open bar?
I've been trying to solve this problem for days and days but I can't. I'm on the verge of a nervous breakdown! I run the Script 'A.py' and every time the mt5. copy_rates_range function, with diffrent arguments, it always gives me the error -2 'Invalid arguments'. The beauty is that, these same
I have been using ea before but now when am putting its giving error its not expert and cant excute trade *** Can anyone pls rectify it Thanks
hi guys i'm a long term mt4 backtester from 2009 year (check siolibros.net if interested) i only use 99% quality backtest with tick data precision, using the well know dukascopy source (throught tickstory) to speed up multiple backtest on a single pc, i strongly suggest to use a ramdisk tool...
I downloaded the free indicator VWAP Lite ( 'VWAP Lite - Volume Weighted Average Price' ). It works fine as an indicator but how do I make it a part of my expert advisor? I understand I need a handle in OnInit() and some kind of call in OnTick(). But how should it look like? Any help is
Hi, can someone help me with MT5 william percent EA and I also i need stochastics EA aswell, EA THAT TRADE LEVELS OF THE INDICATOR...Thank you all
Hi I have been testing my ea with an automatic lot sizing code without problems on mt5. I removed mt5 from my pc and reinstalled it, since then i have been getting errors saying that the account funds are insufficient when the ea tries to place trades. My calculations dont use OrderCalclMargin, i
  Cannot copy signal on my MT4  (16   1 2)
I just subscribed a signal o MT 4 market. However, I don't see any trades or copy trades from that
Strategy Tester does not show all the symbols in Market Watch, what should I do?
I'm updating an EA, I just change my reference site but I get:  Validation completed with an errors test on EURUSD,H1 (netting)  tester stopped because OnInit failed there are no trading operations  but before I loaded without problems... I tried to load an Expert Advisor created using MQL5...
input double TeckProfit= 20 ; input double StopLoss= 20 ; input uint input_value= 0 ; double deposit; double TotalNetProfit; double MaximalDrawdown; //+------------------------------------------------------------------+ int OnInit () { return ( INIT_SUCCEEDED ); }
Hello, First, I apologize if this is not in the right section. If it's the wrong section please let me know where I should post. I signed up for some signals on a demo account, however the size of the trades does not seem to be adjusting correctly. On some of the signals it seems to copy the...
I want to save the deals of my optimizations in different files. To do this I wrote the following code. This works perfectly in test mode. But it doesn't work during optimization. Does anyone know how to do it correctly? Thank you very much !! #include <Trade\Trade.mqh> #include
The following code is relatively simple, but in the mt5 Testing Visualization linear array out of range an error message. I'm a novices, and I had searched for a long time and have not found the reason for the error, but I think it might be caused by the caching problem in the OnTick() function
Hello, In metatrader we can set expiration date for pending order Is it possible to create tools for entry time pending order such as specific time for entry? Thank you in advance
I put some horizontal line for High, Low and Middle line and it can be show when I put it on the chart. But seems the horizontal line not showing when I did the Strategy tester so I can't really evaluate my strategy fully My analogy on this is if you still play in the range it will be okay, but if
This is a simple MA cross EA im working on but have ran into a problem when compiling? If anyone can help that would be great! Lines: 15 and 45 are incorrect. #include <Trade/TRADE.mqh> CTrade trade; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { } void
Good day sir ! The question is specified on the subject. I would really appreciate some insights. Thank you
Is there any chance to find out the tester pass number in OnInit() or OnTick() Event? I mean this number: Goal: Find out the optimized parameters and their values for each tester pass in the OnInit() or OnTick() event. ParameterGetRange is not possible because it only works in the OnTester
Good evening guys, Please I need your help on this challenge. Whenever I clicked button on my chart to send message, it returns error message, below is the error message: CHFJPY ,H1: {"ok":false,"error_code":401,"description":"Unauthorized"} How do I handle this please
I have been exposed to writing the trading logic onside the ontick() function and see them trade on the logic programmed. void OnTick () { ArraySetAsSeries (ma1, true ); ArraySetAsSeries (ma2, true ); ArraySetAsSeries (close, true ); CopyBuffer (maHandle1, 0 , 0 , 1 ,ma1); CopyBuffer
Hello guys! If anyone has the time to help me I will be very grateful. I have the following problem: When I send a limit order below market price (which I understand should be rejected) it is being executed at market price. This happens even with a long distance, in the example I'm using 20pts (40
I have an EA which regularly reports the status of an account to a web service. This has worked fine for years on MT4 and I have recently written an MT5 version which has also worked fine for several months on one MT5 account (BlackBull Markets) - and still is! However I have now put it on another
I'm have 10 order. 1 of them close and I want set a new order like the order close( volume, price, sl, tp ). i try some way but it don't like what i want. Can you help me code this or show me the best way to do, please. I'm a newbie so something i can't understand, can you show it clearly. Thank a
I am trying to calculate the current balance using CDealInfo and HistorySelect. But every time I run the script I get a different results. What am I doing wrong? Thank you so much!! #include <Trade\DealInfo.mqh> CDealInfo deal;
  close percent ea  (2)
I have searched mql5 and online and cannot find an ea which will close any trading position out at x percent of loss of one trade. from another ea like you can input magic number in their