Expert Advisors and Automated Trading - page 287

hello is there any way to make the sleep indefinitely? actually i am running two EAs on 2 different charts and first ea is only needed during the first few seconds of initialization, after that i dont need that Ea anymore i know " ExpertRemove (); " function but it removes the EA , i dont want it
  New Deal Error  (8)
hello I am going to test my strategy and I got error 4014 for opening new deal, Kindly let me know, bool Trade( int direction, double volume, double PivotStoploos) { ZeroMemory (Request); ZeroMemory (Results); ZeroMemory (Check); Request.action = TRADE_ACTION_DEAL ; Request.symbol
[Deleted]
I tried several ways, using if (LastAccountBalance <AccountBalance ()) {do something}. But I couldn't do it at all ... I already have the EA, which I coded myself, I just want to know how or what I would use so that if the last order is Loss the next order will set the TakeProf the same amount of
I'm new and I'm trying to move forward. Please help me. 1) I want to open only 1 position for this signal using "if function " but I couldn't. :( 2) I have more than one signal. and I have a separate shutdown signal for each signal. So I think I need to record the ticket number and I need to
  Load(import) dll  (4)
How import/load and unload a dll in expert(EA). If you have a source code or example please upload
Hi, I have a problem with my EA. It's calculateting the 21,13 and 8 eMA and it should give a Buy signal if the 8 - 13 - 21 are on top of each other in this sequence and a Sell signal if they are beneath each other. I hope that you get what i am trying to say. The thing is it works if i check for a
//--- input parameters input int StopLoss= 30 ; input int TakeProfit= 100 ; input int ADX_Period= 8 ; input int MA_Period= 8 ; input int EA_Magic= 12345 ; // Ea majic number input double Adx_Min= 22.0 ; // Minimum ADX Value input double Lot= 0.1 ; // other
Hello I am new to all of this. I have a trading strategy I am looking to automate but I need to make sure of something first. Can you code custom position sizes based on the amount you have in a trading account? Such as 1.3 % of your account size? Thanks
[Deleted]
MetaTrader Trading Platform Screenshots EURUSD, H1, 2020.05.30 GT247 (Pty) Ltd, MetaTrader 5, Real trailing stop should be less than take profit
Hello folks, Is there anyone have tried this? Could anyone show me a part of an example code? I'm coding an EA using 5 minutes chart and depending of the conditions, it will open new orders. As a result all the orders time are opened by multiple of 5 minutes: 0,5, 10, 15... But now, I'm trying to
Hi, I can't seem to get these events to fire. I'm trying to write to a file but it does not output and the Print() function does not output anything to the log either. If I place the same code in OnInit() it works fine and I find the file with the output. I am using a 4 core processor and no local
  Coding EA help!  (3)
Hello, i am still coding my EA but there are some questions that i wanna ask to you all because I am an amateur in this MQL5 language. Sorry for my bad english xD The questions are: 1) How to give a certain time interval for EA to execute buy or sell? Example: I activate the autotrading on
My brother and I built a BOT, it works awesome on his computer but does not work correctly on mine. It will not close out positions when it is supposed to and just does not seem operate correctly. We both are using Windows 10 and all our settings in the BOT are identical. Any ideas
Hi all, I've attached the EA that I'm coding. It keeps coming up with "not all control paths return a value" - I''m not sure how to resolve the issue. Any help would be appreciated. Thanks
Hi, I am using an EA which is working great for long and short positions combined. I am looking to trial an account with long positions only and a separate account with short positions only. However when i select either long or short positions only in the common section, it will either not open a
Hello everyone, I am cracking my head here. My code simply does not execute the SL or TP orders. They appear on the testing graph, but they are not executed. Can anybody help, please? Thanks. //IMPORTAÇÃO #include<Trade\Trade.mqh> //cria instância chamada "trade" CTrade trade; input int lote = 12
I wanna put whole my deposit to a position my code is working for currency pair like EURUSD buy cryptocurrency pair like BTCUSD give me invalid price error. Can someone tell me what i did wrong? double PriceOpenSell= NormalizeDouble ((AccountBalance/ 100000 )/Ask, 2 ); double PriceOpenSell=
Hey everyone! I recently started trying to program my own EA, and discovered this new world of expert advisor programming. I've programmed in Python and R in the past, as well as a bit of C++, therefore I am not too lost so far. However, I would like to create a mechanism that requires a specific
failed CTrade::OrderSend: instant buy 0.01 EURUSD at sl: ..... [ invalid volume ] Hello masters. I am new among you. When I try to put stop loss on my little robot, after a while I get this error. Can someone arrange this for me as it should be? so that I can learn something new. I apologize in
Hi everyone! So basically I'm coding an EA that places one trade depending on a given signal, and that trade runs just perfect. It places the trade when it should, and it changes the stop loss to breakeven once the first take profit target is hit. I want to code it so if the stop loss is hit
HI everybody, someone can help me with a simple EA
Hello.. i cant figure out whats wrong with my code.. the lot decreases on next signal instead to increase input string MartinGale = "===< MartinGale Settings >===";input double Risk=1.0; input double Multi=0.5; double MinLot,MaxLot,Contract,lot;int
Hi all, I am still working on an EA that I am translating from MQL4 to MQL5. But I keep getting the same issue. So the goal is when an order gets executed (is a position) I play a different sound. I use text to speech instead of the standard alerts MT5 brings. The code itself runs well. The trading
Hi, When I run my EA on strategy tester, the indicators of that EA are not showing (sometimes they show like 1 in 6 times), and I stop and restart the strategy tester again and again until it shows. . . Clearly there are some problems, can anyone tell me why this is happening and how can I display
I cant found the error, here is the code. i want to use this file to import in another string CheckSignal() { MqlRates PriceInfo[]; ArraySetAsSeries (PriceInfo, true ); int Data = CopyRates ( Symbol (), Period (), 0 , 3 ,PriceInfo); string signal= "" ; double MiddleBandArray[]; double
hi guys, Is it possible that I get a tutorial, training or article that deals with the intricacies of developing a market scanner. I am new to developing in MQL5 and have written some EAs but a scanner will help my general productivity and I want to embark on that. I am still trying to get some
Let's say my EA is not performing very well and losing too many trades in a row, is there some way I can tell it to go sit on the bench for some time, like one hour or two (specifically) and try again later? Of course, I want to do that programatically, so it can always run unattended. TIA
Hi there, since a few days I recognize that if I run a backtest there are more objects (= trades) in the backtesting chart than the EA generated. It seems that thee EA uses a different template than the "tester" template. If I apply the "tester" template manually to a chart window, then all objects
Hi all, I'm completely new to developing EAs so hopefully theres a simple solution to this problem that I just can't see due to my inexperience. The EA should open a position if there is a new candle on the 5 mins timeframe, if the trend on both the 15 mins and 1 hour timeframes (based on a
can i ask that if my ea place some orders and then i addientally close the chart tgt with the ea, when i load it back agn, the orders is still there, but will my ea recognise those previous order