Expert Advisors and Automated Trading - page 354

hi every one. how to tell if a position closed by TP or by SL was opened by EA? i have an open position  by  using OrderSend(). depend on TP or SL happen, i want to call FunctionA() (When TP  ) and Function2() (when SL happen). thanks.
Is there a way to see indicators while Strategy Tester Visualization is running? If it is not implemented are there any plans to do so? This is crucial for EA debugging. 
Hi guys, I'm getting Order Send Error 4806 and I don't have any clue why ... This is the code if(SubTotalSellOrder() == 0) {  ticket = m_trade.Sell(Lot,NULL,m_symbol.Bid(),0,0,"comment");  if(ticket > 0)     {    Print("Order send success");    TakeScreenShot(1280,720,0);    return;   }  else...
Hi, I need code to send Message & Picture via SlackChat. I have been searching around but I did not find it. Please suggest. Thank you!
  EA  (7)
Hi all, I came across an EA capable of trading objects (definetely open long and short orders) drawn on chart by any other indicators. Can't remember its name and lost it after pc update, is there anyone to give me help in finding it ? thank you very much
Hi, i am using a script i found online which sends email at MA crossover. It works, however i doesnt tell me the pair, so i have to add the symbol parameter if (SendAnEmail) SendMail("Price closed above MA"," + Symbol() + "); If i do the above line, it sends the email but just puts the text +
example color ZBCol = Gray; How to set color by RGB (128,128,128) ? Thank you
Hello, How can I get the last 60 sec data in mql5? I mean not bar of 1 min, I want that every second I will get new data and erese the last second data. is it posssible ?  Thank You.
hi. after i reinstalled metatrader , in Oninit(), RSI indicator cannot be loaded. While it worked well before i reinstall metatrader. Does anyone know the reason?
  grid trading lot  (1)
Hello, I am going to create a function of grid trading lot: if trading direction is long and market price goes down, then multiple the trading lot according to previous order. I think the rule is quite simple, but I always get error message of "invalid lots amount", would you please give me some...
I want to count history deals from down to up. But my code not work perfectly. Please help me anyone.   HistorySelect(TimeCurrent(),0);   if(HistoryDealsTotal()>0)     {      for(uint i = uint(HistoryDealsTotal()-1); i >= 0; i--)        {         if(Deal.SelectByIndex(i)==true)...
Hi, i am running a very useful ema crossover indicator which features email alerts. however when the alerts are sent, the email title is a simple "Price closed below (or above) MA". I need to add the "+ symbol" command in the script in order to know which pair the alert is for, as i use the same...
Hi All, Im rather new here and I want to create a simple system where I look at the high and low of the first 1 hour candle at a start time (in this case 9.00).  If after this first 1 hour the rate goes above the high, than sell. If it goes below the low than sell. What I did so far is the following...
As title says, I have no idea what is wrong but only a handful of EA from the market are actually working through the MLQ5 tester. All the other ones runs the tester but it doesn't buy anything. (Most EA tried are the Free and a few Demo) On a few I tried playing with the amount, leverage, time...
Hi all, and thanks in advance for everyone who's givin' up his time supportin' the community...!!! My problem: I got the Supertrend-Indicator https://www.mql5.com/en/code/576 and I wanna work with his indicator data. But when I try to use it in an EA via iCustom() I don't get the right values.....
[Deleted]
Hello guys! Im struggling with function which gives true when the latest closed order had been closed by stop loose. Could you help me ?  Thanks in adnvance!!!
Hi, I have a indicator as ex4 file and I want to create a EA based on it. It's an indicator which shows me arrow to buy or sell. Do I need to have it's mql4 code to create EA related with that ? Is there any way / sample code by which I can use that indicator's ex4 itself  to create EA ?
//+------------------------------------------------------------------+ //|                                                   nadex5mins.mq4 | //|                        Copyright 2017, MetaQuotes Software Corp. | //|                                             https://www.mql5.com |...
  Previous iRSI  (1)
Hello, I am new to MT5, shifting over from MT4 and I am having some issues with last candle values on an indicator. My EA looks to see if the 1H RSI of the last candle is higher than 4H RSI of the last candle. I am wanting to know how to get the RSI of last candle similar to the MT4 way:...
hello ... is there any code to load set files ( EURUSD .set) by the EA ....??? the case is : I have multi pairs EA and each pair have different set file
I need to return a specific value based on _Symbol of current chart. It seems switch operator doesn't work with _Symbol. Thanks
I can't find any documentation on how to implement the sorting of Lists in mql5. I see that CList calls the Compare() from the CObject pointer. So how can I call the child class Compare() overridden method from the parent pointer? Example: #include <Arrays\List.mqh>
Hello guys, i'm starting in MQL programming and I want to do a simple thing: Constantly check (loop) the open orders and write them into a file. Please, could someone guide me what I need to do? (OrdersTotal? FileWrite?) Thank you for any help, have a good day
Is it possible to have conditional inputs on an EA? For example, let's say I have this three enums enum Condition{  Foo,  Bar,};enum FooCondition{  Foo1,  Foo2,};enum BarCondition{  Bar1,  Bar2,  Bar3,}; Now, I want to add it as inputs to my EA, so, first I add a input for the Condition enum: input...
Hi experts. If I want to add value to x variable every bar in function ontimer. How to code it? Such as in TF H1,Ontimer,and x+1 every bar at 6:00 , I set x to 0.     7:00   x =1     8:00  x=2      9:00  x=3 thank you very much
Running a signal copy under mql5 VPS i will receive notifications on my phone from transactions?
Dear Sirs; Does VPs real reduce significante slippage on copy signals for different brokers? The signal provider iam copying for use a broker who dont allow copy but allow signal share! This is the differences pointed by Mql5: FxPro.com-Real03 4.71 × 1830 Is it a lot doesnit
Hi All Any ideas why after hit STOPLOSS, new Sell order cannot be send? Thanks in Advance (My First Try for EA)    if (TotalOrder == 0) //If there is no working order     {      int last_trade = OrdersHistoryTotal(); //Determine last order ticket number      if(OrderSelect(last_trade,SELECT_BY_POS...
Hi guys, I was wondering if you could help me with two issues I am currently having? :) Here is number 1:  if(PositionSelect(_Symbol) == false) // We have no open position       {       if(MathAbs(PriceDataTable[1] - mAData[1]) < 10 * P)            {            if (my conditions to open a trade)...