Expert Advisors and Automated Trading - page 387

Hey Guys I have a 1hr/4hr GBPUSD chart on profile with an EA attached. I then change profiles, the new profile is 1hr/ 4hr EURUSD with the same EA attached. Will the EA still be functional on my 1st profile as in my second? Cheers John
I'm trying to understand if I can use multiple cores on this EA: I read an array of trades from disk:  Buy ENQ on March 1  Buy ENQ on March 10  Buy ENQ on March 17  .....  Etc. ... and then loop throughthem, calling OrderSend() for each With one core active thetrades are executed in order, but when...
I have an EA that uses OnTimer() to read a file from disk, trade on the basis of its contents, and close it. Things go fine when I backtest the EA 4 times with static input values of 50 and 100 for two input variables (4 different runs). But when I try to use the optimizer with input values Start =...
Hi In order to properly find out if my pending order is executed i try to exactly understand how it works: So i find out I can place a pending order (trade_action_pending) then i get result.deal=0 result.order=12345678 order.result ist the order ticketnumber right? now here comes the first question:...
[MT5] How to display the arrow only at the chart that open positions - close position (Show realtime history of deals on chart), other charts will not allow display the arrow. i open multiple charts of the same currency pair (using different time frames or same time frame) and run a robot on each of...
I have a MQL4 code: for(int i = 0;i < 3;i++) {    kline[i] = iStochastic(NULL, Period(), 8, 3, 3, MODE_SMA, 0, MODE_MAIN, i);    dline[i] = iStochastic(NULL, Period(), 8, 3, 3, MODE_SMA, 0, MODE_SIGNAL, i);  } But MQL5 dones't have MODE_MAIN and MODE_SIGNAL. How should I get this result at MQL5? The...
How to add an indicator for a certain time frrame just to see the trend. Whereas I want to trade in another time frame. How to create srciptnya mt4 for expert advisor . Thank
[Deleted]
i just created an easy 3 button, 1, button close buy 2, button close sell 3, and the new button, button minimize on the pic, the top right button is button minimize, when click it, the button close buy / sell,  i want it to minimize, and click the 2nd time, it will show it again. so what the...
first of all...i suck at programming language.. lets keep this as simple as possible... order = i want the order to be like this order will be purely based on the heiken ashi(HA) candle color..so if the previous color of heiken ashi candle is red, sell order will be open right at that time when the...
Hello , can you help me please . How can i read this value by ObjectGet without buffers . i need value like USD 3.3  Thank you
  Close all order  (5)
hello master master goodnight, I want to ask how to make a script on mql4 to close all orders in just one currency only. example: I trade in many currencies with a lot of open positions, but when the EURUSD currency I see false position,then all orders in the EURUSD currency will close all position
Existential doubt... If my broker increases the spread considerably over the weekend (44 in EURUSD)...this will be the spread that MT5 use in the strategy tester? I hope not, because it would be impossible to do tests during the weekend. I hope I can get out of doubts. Thank you in advance....
Hi, Is it possible to grow an open position without opening a new one in Mql5 on a hedging account? I'm using the Ctrade class. Thanks for your tips
  OnTrade function  (2)
Hi guys, do you know how functions( like OnTrade, OnTick in MT5) are called? I Mean: supposing in receive 2 ticks events with 1 second of interval, but inside the OnTick it takes 3 seconds, what' s going to happen? The 2° call starts after the first call is finished or the second starts even if the...
int LotDigits; //initialized in OnInit int MagicNumber = 937422; double TradeSize = 0.1; int MaxSlippage = 3; //adjusted in OnInit int MaxSlippage_; bool crossed[2]; //initialized to true, used in function Cross int MaxOpenTrades = 1000; int MaxLongTrades = 1000; int MaxShortTrades = 1000; int...
Hi there, I recently installed a new MT5 software and I am getting the following error messages:  Toolbox/Experts - loading Moving Average failed Strategy Tester/Journal - Moving Average.ex5 failed I have tried to re-install MT5 trading platform several times but no avail. 
  Speed up my code  (1)
I have an imaginary code -  First question : I have to get just "bid" and "ask" value for each tick, it's faster with the "MqlTick" structure, or "SymbolInfoDouble" ?  Second question : I have (for example) 3 indicator : a moving average "MA" - an average true range "ATR" - an average directional...
Hello every one I have a question about back test in MT4 Back test using MT4 test only one time frame as example we can test EA on M5 or H1 frame but when my EA use for example moving AV for M5 and moving AV for H1 test fail IS there any way to test EA witch use multi time frame in calculation, is
The data from the broker has some big errors in the data.  I want to edit this data myself and correct it.  In MT5, is there a way to do this?  Thanks. 
Hi, I have coded a very simple EA to trade on gold. I'm use to code some EA for EURUSD but while back-testing this new one on Gold I have been really surprise by the result. Usually when coding EA, I focus on reward:risk ratio. This one gives a reward:risk of 10:1 which is... too good to be true :)...
Hello everyone, Friends, my ea gives a warning. I wonder why? Can someone please help me? Thanks in advance.
Hi coders, This code is to get the TP, SL and Gain/Risk ratio from opened Positions. It works in Hedge but not in Netting accounts. Can anybody help me? Thank you in advance! int pos_total = PositionsTotal(); if (pos_total > 0) {  for(int pos = pos_total - 1; pos >= 0; pos--) {  ulong PosTicket =...
I have an EA that have 3 Moving Average , called MA_1, MA_2, MA_3. My question is: I have to optimize juts the period of the 3 MA, such that MA_1 goes from 3 to 100, MA_2 goes form 4 to 100, MA_3 goes form 3 to 100, but I need to avoid the calculation of all the result that have MA_1>MA_2 &&
I don't understand where is the error because i get an invalid stake . //+------------------------------------------------------------------+//|Funzione Investimento                                             |//+------------------------------------------------------------------+...
Hey all, I'm new to MT and to this forum, so any and all help is appreciated. I would like to do something simple and straightforward - calculate various retracements from the current daily hi/lo as price continues to update throughout the day. So for example, if at 10am central the current range in...
Hey all, I have been searching for a long time for an EA that moves SL to break even at a set target price while also closing 1/2 of my position at that price (so it does 2 things at once).  Does anyone know of an EA? And it must work for MT5 because that's the software I use.  Thanks in advance
I had an idea - to show how at the last three bars the direction changed. And at the same time for all 21 timeframes. That is to show on the screen what bar - bull or bear.
I‘mtrying to close a position but I get always the ERROR: invalid fill. Thecode is basically as follows: ...CpositionInfo PInfo;CTrade Trade;...for(uint i=0; i<PositionsTotal(); i++) { if(PInfo.SelectByIndex(i)) { if(...) { Trade.PositionClose(PInfo.Ticket()); } } } Whichproduces the...
Hi, I'm new to this market and program so I started a couple of demo accounts each with its own signal subscription. I always have the metatrader4 program opened on my computer as well as on my phone and I've noticed I've missed many trades that my signals have performed. I'm not sure if I can only...
Hi all Is there a way for the active EAs to communicate with eachother or for some hierarchy in the order they run . For example 5 EAs running on the same MT4, where in order for eachone to run,it has to wait for the previous one to complete itsoperations. What I think is to have the EAs create a...