Expert Advisors and Automated Trading - page 223

I'm wanting to use MQL5 virtual hosting to run an EA I purchased in 2016, but when I try to set this up it fails with "Migration to virtual hosting failed: old EX4 file version." Then it tells me to recompile the EA and migrate again. But I am not the EA vendor -- I don't have the source for it
I am doing a lot of testing with an EA based on MA crossover.. and it seems that whatever I try to add, (a condition / indicator) it affects the results negative in stead of positive.. a lor less profit and more drawback! Who has the same experience? Is the simpler EA most of the times the better EA
im new to coding mlq5 and as a beginner i tried to make a EMA (exponantial moving avarage) bot that shows a BUY comment when the price was going under the 50 EMA line while the 50 EMA was above the 100 EMA and the 150 EMA. even though there is no error in the code in backtesting it does not show
Hi Apologies if a solution has been posted elsewhere, grateful if anyone could point me in the right direction. (Also The problem encountered is that I'm trying to extract the values for an indicator, the stochastic oscillator in this instance. However the values returned are outside of the expected
Hello and thank you for reading my enquiry! I am programing an script that analyzes all the symbols of market watch in all the temporalities using a custom fractal indicator. The problem is that the indicator function iHigh and iLow will return 0.0 if the specified symbol is not opened in a chart
Hi my friends, I'm working on one indicator that can show last status of one specific indicator. and I'm really struggling with it. is there any body to help me with that? Ok lets me explain more about it. this indicator scan market watch symbols and if last signal of our predefined indicator(for
I would like to get the number of candles from a specific Date/Time to now. The idea is to get the lowest and highest price from candles since my Date/Time of entry. When I try to subtract my Date/Time from now (TimeCurrent) only the time seems to work: CandleRange = (Now)2020.04.24 15:33.45 -
#include <Trade\Trade.mqh> CTrade trade; I am new to mql. I have seen the code above in *** but there are parts I do not understand. I understand the first line. We are importing the Trade header file from the Trade.mqh library. What does the second line mean? Are we assigning the CTrade class to a
[Deleted]
I'm trying to calculate lotsize based on risk percentage, but CheckOpenShort is returning 0.0. Also, is there a way to have it return two decimals? Here's an example of what I'm trying to do: #include <Expert\Money\MoneyFixedRisk.mqh> MqlTradeRequest request; request.price = 1.00000 ; request.sl =
Hi all, Can someone please help me with my trailing stop? I have three different levels: 1 - Stop loss following at Moving Average 2 - Locking in Pips 3- Trailing The function works but seems to break at some point and only work if I reload the EA. How can I ensure that the EA looks at all the IF
Hi, How can I load data on chart multi timeframe? I using indicator muti timeframe, problem is high timeframe not found data becuase no data on chart with error 4806 (allway) Indicators ERR_INDICATOR_DATA_NOT_FOUND 4806 Requested data not found this happen all time on first time using EA How I fix
  test price  (1)
hi all ... I need an EA to test (back test) simply the price. example: enter long at this price ... TP always sets the price and stop loss always sets the price, the same thing for sale. who can help me out? THANK YOU
Hi, I have this .NET DLL that I made, called TradingSystem.dll, and I import it into an expert advisor in MT5 running on Windows 10 x64. The EA code looks like this: #import "TradingSystem.dll" void TS_Initialize(); #import int OnInit() { TS_Initialize(); return(INIT_SUCCEEDED); } The .NET
Hi, im having a problem on limiting the numbers of the Orders that my EA makes in the same candle. I attached the print showing my problem. I want to do something like: input int max_orders_per_candle = 2; if(TradeSignal==true && orders_in_actual_candle<max_orders_per_candle) { //now i execute the
I have created a news trading EA but when submitting it to the market approval and moderation, the automatic approval system says it has errors when it does not. It says it places no trades, whereas it does place trades the settings need to be for a specific time and date. Please can someone suggest
Hello, I saw it mentioned on the forum that we should initialize all buffers. However, when I look at examples (like CCI or Envelopes) I don't see any initialization happening. Being precise, should I have the following snippet in my every indicator, in the onCalculate? if(prev_calculated == 0)
Hi Is it possible to build an EA which can test the indicator conditions and place/close the orders accordingly on different/multiple currencies simultaneously. I tried in script module:- 1) Getting list of all instruments provided by broker. 2)Tested them one by one based on indicator conditions
Hi guys, I believe I am worse at trading than a bot :-) so I am looking into building my own bots. M y idea is to build several bots for several market condition... (Shorting.. longing and range bots..) Last week I have been working non stop on a simple shorting bot (I use AE Builder). Today I did
Could you please help me solving my errors ? I just started programming and I have no idea how to solve this
  sendmail  (5)
HI everyone, I have a code that sends me an email when a trade goes to stop loss. I would like to change this code so that the email is sent to me only when the trade is opened Thank you
Dear Friends I need a "quick and dirty" EA, script or Indi which can read RSI Data from a chart. The only special thing is, that i need to set a Time Interval to store the Data. for Example, i attach it on M5 Timeframe but Timeinterval is 2 minutes. So that mean all Data which are in csv generated
So I am working with an EA that gets info from Ichimoku, here is my code: int i_def = iIchimoku ( _Symbol , _Period , 9 , 26 , 52 ); double tenkan[],kijun[],senkouA[],senkouB[],chikou[]; ArraySetAsSeries (tenkan, true ); ArraySetAsSeries (kijun, true ); ArraySetAsSeries (senkouA, true );
My code for a trailing stop does not work, can someone please advise me on what is wrong with the code if(PositionsTotal()>0){ for(int i=0;i>=0;i++) { /*string position =PositionGetSymbol( i);int TYPE=PositionGetInteger(POSITION_TYPE);// buyif(TYPE==POSITION_TYPE_BUY);{double profitpoint=
Dear Experts I need advise on how to attach my EA to a manually opened position. Also if a chart on which an EA is attached is delete I lose the EA's tracking in the chart. Can this be reinstated? Any suggestions would be most appreciated.
  error 4802  (1)
Hola a todos tengo este error estado estudiando este error y he probado 1 cambiar la terminal 2 volver a copilar todos los indicadores 3 examinado el codigo del indicador no encuentro el fallo por ningun lado dejo el indicador y la estrategia gracias por la ayuda
This Is My Expert Code. I am going to have Automatic Trading according another indicator data (Test_SellBuyPoints). Whenever I want do debug my code and step by step running, I give "Critical error occurred, debugging is stopped", message in line 38 of my code which is if(IndHandle<0) nothing is
[Deleted]
Hi all, for the last couple of days I tried to code an EA for my manuel trading system which is based on the Kalman Velocity indicator. I dont get any error or warnings in Metaeditor, but the EA doesnt open any position. Could someone help me here? The idea behind the EA is a simple cross over the
  Problem with  (1)
Hello, i want to check day of week using TimeToStruct within OnTick, when new bar occurs. The problem: Day of week is constant. TimeToStruct on latest completed bar fetched with CopyRates, returns no error an also the bar date is changing. void OnTick(){ if(new_bar() == true) {
Hello, i search any solutions for close one or more order opened manualy with my EA manager following the instruction "CLOSE ALL ORDER WITH COMMENT...". Example: I have a very good and profitable manual strategy with one or more position on markets... In a manual trading is not possible specifi a ID
I'm using MT5 hedging account and I'm trying to open an opposite market order (hedging order). I'm using MT5 hedging platform. The problem is when I open the hedging order the existing order gets closed, why is that? Here is my order opening code. // Open buy market order if (close[ 0 ] > ma[ 0 ]