Expert Advisors and Automated Trading - page 162

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
If I had a position on "EURUSD", there are 2 ways to get current price. 1) PositionSelect("EURUSE") then call PositionGetDouble(POSITION_PRICE_CURRENT) 2) SymbolInfoTick("EURUSD",lastTick); My question is what is the difference? Which one I should use?
  Count bars since ... ...  (13   1 2)
Hello guys! I have one question and I need some help please. I have made a EA based on several indicators for entry/exit/TP/SL etc. My issue is that it is opening too many trades. What I mean is : I have one 2 lines cross indicator as one of the conditions for opening a trade. If crossing up +
  EA controller  (1)
I am looking for an good EA controller since my current EA doesn't have any build in news filter. I am looking for an News filter with multiple options such as: Close only profit trades, Prohibit opening new trades, close all , close before .. min, enable trading after .. min. IceFX is an good
Hello guys. Have a situation with calling a iCustom indicator in EA. Actually I have two custom indicators in this EA, both are working, but the problem is that one of the indicators is taking the settings from the indicator, and if I change the settings at the EA input, it will not have any
Code: //+------------------------------------------------------------------+ //| Close profit position | //+------------------------------------------------------------------+ void CloseAllProfit() { double Balance =
[Deleted]
Hi I am using ATR indicator with period as Day. Index[0] of this indicator returns the current day's ATR and as the day progresses it increases or stays same. I want to capture its changes on every 5 minute. I have tried using iTime/iBarShift functions as below to get Index values on Period_M5. In
I tried to modify the loss. But I got error code 10016. How to call PositionModify correctly? Thanks. CTrade ExtTrade; void ModifyPorfit() { double p = PositionGetDouble ( POSITION_PROFIT ); if (p < 0 ) return ; double volume = PositionGetDouble ( POSITION_VOLUME ); double points =
Hi  I rent a VPS for a month and I run it , My question is when synchronization  With expert advisor and completion Should I turn on automatic trading or close it ,  because it closes automatically when I activate the VPS ? Should I add the expert advisor to the planned ? And how to choose the...
Hello everyone and thank you for this fabulous forum! I am looking for an assistant generating alerts under certain conditions that can be programmed (paid or free) For example : ALERT 1 if : M30 - EMA 89 above EMA 21 M5 - MA 89 above EMA 21 M5 - STOCHASTIC below 20 ALERT 2 if : M30 - EMA 89 below
  error code 4806  (22   1 2 3)
Error: IP 0 06 : 07 : 45.880 MA on DeMarker (US30,M1) 2020.03 . 24 00 : 03 : 19 ERROR! EA: MA on DeMarker.mq5, FUNCTION: iGetArray, amount to copy: 6 , copied: - 1 , error code 4806 EM 0 06 : 07 : 45.888 MA on DeMarker (US30,M1) 2020.03 . 24 00 : 03 : 20 ERROR! EA: MA
Hello. I wanna implement Martingale strategy in my EA, after each losing trade the risk is multiplied by 2. However, after the first losing trade the risk multiplies by 64 and the EA stop working after that. Can someone expain what might go wrong? It's very important for me. Thanks double risk =
Hi all, I'm wondering if I'm missing something, but I am unable to remove/disable the two lines that each connect the highs and lows, respectively, when running via the strategy tester . Anyone can help me sorting this out, how to get rid of them? I intend to use several indicators, and I find it
Hi, this is a bug, right? The constructor should always be excecuted, also with ArrayResize. When changing struct to class, it works in both cases, struct works only with first case, not when using ArrayResize() struct CA { public : int intvalue; public : CA() { Print (