Expert Advisors and Automated Trading - page 14

To post a new topic, please log in or register
Someone in this forum knows of some complement or mechanical mechanics to be able to make the optimizations a "pausable" work, which can be archived and continue another day? I can export the optimization results, but if I re-run the optimization, it reprocesses those steps, could they be canceled...
Hello all! Im trying to make an indicator to print arrows in exact times to work around with mt2iq. Example:  Nearly everyday on AUD/JPY comes a red candle by 00:00 then at 1am also a red candle on GBP/JPY Im not around at all the times those one come, so I wanted to make an indicator with all the...
Hi all, I've been looking an EA to place a stop-loss order automatically for MT5. I tried to build myself, but my knowledge is not deep enough and neither I find any EA for MT5. (I found few for MT4 though). If anyone can provide a code or mql5 file, it would be very appreciated. Thank you so much...
Dear Gurus Sincerely seek your help. I am not sure why the value printed with the code below is always "0.0"? Pls refer my code and screenshots from testing below. I am very sure there is value from the DonchianChannels indicator at the most recent close bar and there is a DonchianChannels.ex4 in...
Say the current "EURUSD" price is 1.12345, and then I placed a order MqlTradeRequest req = {0};req.action = TRADE_ACTION_PENDING;req.type = ORDER_TYPE_BUY_STOP_LIMIT; // ENUM_ORDER_TYPEreq.price = 1.28;req.stoplimit = 1.3;req.sl = 1.27000  ;req.tp = 1.27850 +...
Steps: 1. Login an account from an MT client terminal successfully; 2. Run an EA; 3. Change master password; 4. Invalid account come. But how to check invalid account from an EA? The AccountNumber() is still correct, the IsConnected() is still true. Thank you.
Hi, I want to create my own EA, but I am stuck because programming is not my forte. I have created/copied a simple alert indicator with which I am happy, but instead of Comment SELL or BUY I want the EA to enter a trade. Can someone please replace the comment part with the code necessary to enter an...
Good Afternoon, I am looking for a code with which I can close all operations when I reach the first TP
Hi everyone, My MT5 Expert works with many symbols simultaneously. EA doesnt support multiple symbol testing. I've tested all symbols separetly. So, is there a way or a sofware to combine multiple MT5 backtest results into one? Thank you very much.
  MT4 to MT5 (3)
hello, while reading around I have come across an very interesting idea of an EA (sadly an MT4 one). it basically open an buy stop and a sell stop pending orders at a distance from current price, when one order is triggered the other one is canceled and two new pending orders are created at same...
Hi, We are running an EA with MQL.com VPN. When we generate the detailed report in our desktop Mt4 then it's not calculating the correct draw down. It always shows the same drawdown which it was at the start of EA running. Now it's more than 10 days and we know that floating amount was very big...
Is it possible to save only the used parameters for the top 10 passes from the optimization results? With higher pass numbers the logged results file (starting from terminal) can be tens of gigabytes, which is unnecessary. So I was wondering if in the OnTesterDeinit() function, results can be...
Hello, I'm trying to get the deals closed in profit within the previous 12 hours. if (HistorySelect(TimeCurrent()-(12*60*60), TimeCurrent())){   Print("Found ",HistoryDealsTotal()," deals.");   for (int i = HistoryDealsTotal() - 1; i >= 0; i--)   {     ulong tk = HistoryDealGetTicket(i);...
Hello Gurus Can we plot the indicator using an EA, for example if I have an EA trading 5-MA 15 MA cross, can I plot those indicator lines in EA- I badly need this way for some testing purposes Please share some example or a tutorial, I tried for days but couldnt do it in MT4; Thanks Regards Arun
Sorry,  but i cant find info: Im using now C class in mql5 . #include <Trade\Trade.mqh> CTrade my_trade=new CTrade; and my errors:  2019.05.24 15:06:47.929 Breakout_2019 (EURAUD,M5) 1 undeleted objects left 2019.05.24 15:06:47.930 Breakout_2019 (EURAUD,M5) 1 object of type CTrade left and a cant...
Hi all! I created custom symbol with usual parameters got from real one (futures contract). See screenshots in attachments. Loaded history for it. Currency is RUR, Initial margin is 5222. Next I ran simple Random robot with 100 000 deposit in Strategy Tester. What I see: If buy 1, Margin = 14228,...
Hello, I could not find this question in the forums already. I am just looking for someone to double check my math as i am converting orders between accounts with different leverage amounts. Example 1. Amount of equity to keep accounts 1:1 The source account is 1:500 with 5k equity, to mirror the...
Hi All, I want to build a price alert that tracks the following, First, price has to move above A, then price has to move below B, then alert. I am a noob in MT4 programming, any help is much appreciated. Thanks
How to make EA trade at Specific Hour MT5? i.e. 12pm to 10pm PST Thank you!
Hi at all, Anywhere there is a list o other, of params and methods that not run in backtesting mode ( example: OrderTakeProfit() = 0.0 in backtesting mode ) ? Or, how i cand search they ? thanks
Hi fellow traders.I am trying to write an Expert and saying under specific circumstances, place an order and take profit or stop loss. But sometimes it opens and closes under the same candle. And because in this candle the situations are still valid, it opens a new trade. How can I say if it already...
Hi everyone, could someone help me create an expert advisor like this in the image? but without indicators or strategies just buy and when you touch the TP buy again right away.
I'm done, I have spent three days on this error and at this point I'm pretty sure that my robot doesn't have  any problem it prints massages about: Insufficient funds to perform trade operation, Invalid volumes in trade operations(min and max volume for each symbol and volume step), no history bars...
I have never found a system that in a backtesting of 40 FX pairs and at least 500 trades on each, all or most pairs are in profit. For example I have a system that give me profit on 15 pairs (each backtest have at least 500 trades). On the rest it gives me a loss. I didn't do any "optimization",...
Hi experts, I have a little bit confuse about class.Would someone please clarify this?  Please see following code and its result, The results show different despite both function are called from base class.Why not the same? I understand that, If there is prefix "virtual" in front of the function ,...
  EA BAsed on Heiken ASHI (201   1 2 3 4 5 ... 20 21)
Hi Guys, How can I make EA based on Heiken Ashi..I want EA to enter long if the first bar is white and enter short if the first bar is red... Thanks Babar
Hi.... Please help to make me an EA that when open market the robot open buy position, and then SL 100 pips, and TP 100 pips+spread. How can I do that? Thanks in advance
Hi,I have this orderclose function working in MQ4 but as the tester results doesnt show any closed position must be a translation mistake, if someone can check this issue I thank you in advance. void OrdersCloseLong(){   for(int i=0;i<OrdersTotal();i++){      if(PositionSelectByTicket(i)){...
  calculate DT oscillator (15   1 2)
Hi fellow traders I have seen this indicator Mladen Rakic, DT Oscillator I already tried iCustome function to calculate the required parameters but when I want to ask parameters of two different time periods, my computer freezes. so I wanted to know if it is possible to calculate them in my own...
As far as I could see, there's no PositionSelect by index in MQL5, so how can this be done?    for(int i=OrdersTotal()-1;i>=0;i--){      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){