MQL4 and MetaTrader 4 - page 581

[Deleted]
  Infinite loop  (3)
Hello, I need get rid of infinite loop if((cmd==OP_BUY)&&(OrderProfit()<0)){      while(true)    {           result=OrderSend(Symbol(), OP_SELL, LOTS*2, Bid, 90, 0, 0, NULL, 0,0, clrNONE );                 if(result!=TRUE) { error=GetLastError(); Alert("Last1 = ",error); }      else...
[Deleted]
Hi, I want to display the values of the RSI from the 1 hour chart on all lower time frames, and also the values of a Bollinger Band calculated on the H1 RSI. So both values come from the H1 chart. Could you tell me what I am doing wrong please? I can manage to display the RSI but the iBandsOnArray...
Hi, I like to build indicators and strategies with ticks range bars , is it possible with MT4? I thank you a lot Robert
Situation: In a seperate window a couple of values, sometimes very different in value. Based on my user input I can reduce the visibility up to only one series. Problem: But the whole family of series still give there maximum and minimum to calculate the vertical range. Up to now I code a factor to
Hi when I Compile I get no errors or warnings but still wont work :( any help?  I'm trying to get it to place a trade is the same direction if it was in profit or reverse if not. Based off last trade in history. extern double           LotSize=0.01;double                     pips;extern...
Hi coders, the H1 chart is open. Now I would like to have screenshots from H1, M15 and H4. I do it this way: ChartScreenShot(0, _Symbol+(string)_Period+".png", 1280, 720);ChartSetSymbolPeriod(0, NULL, PERIOD_H4);ChartScreenShot(0, _Symbol+(string)_Period+".png", 1280, 720);ChartSetSymbolPeriod(0,...
[Deleted]
Dears, Does anyone know if an indicators similar to the 5Nitro+ indicator exist in this forum? I want to try it, but 200€ is a little steep for a trend indicator.    Thanks for your replies. 
Hello comrades, please consider the following MQL4 codes. The first function which is named "OpenWrite" is meant to write only one of USD or EUR, etc, to a text file. The second function named "OpenRead" is meant to read the content of the file. The first function actually writes to the file....
I recently purchased an Indicator from Market that I really like but I prefer it as an EA. Is there any way to code an EA to read an Indicator you place onto a chart?
  Delete pre-alert  (14   1 2)
Hi guys. I have a problem I can not solve. I created this code where I have a pre-alert. Buffer1 and buffer2 are pre-alert, while the Buffer 3 and Buffer 4 are the real alert. I wish I could erase the dots of the pre-alert all the times that of Alert arrow appears. I made several attempts but did...
[Deleted]
Developed EA for MT4 using <link removed > . Code refuses to run. What can i do? Any suggestions would be most appreciated
  Ichimoku chart  (1)
I have noticed that all my charts in mt4 using ichimoku, seem shifted when compared to browser versions of the charts provided by trading websites. Why are they different. Which is correct?
I am having issue with the attached EA trading multiple times per bar. I only want it to place max one trade per bar. I have tried to edit the code but it still seems not to work. Please could someone have a look and tell me where I have gone wrong? Many thanks.
Hi I am looking for the opinion of some of the experienced people on here. I have programmed a simple EA, and it seems to work fantastic on a demo account. I know trading live is different, but what I want to know is in what way is it different and could this difference have an effect on my EA
I want my EA to only place up to 3 trades, and only once 1 manual trade is already open. Currently I have set up an external variable of TotalTrades and set this to 3. This is limiting the max trades to 3. I can't seem to work out how to set the requirement of 1 trade already open though. I...
I am currently building an EA to automate part of my trading system. However, I am unsure how to program one of the criteria. I only want the EA to place trades when all current open orders for the currency pair are all in profit. These could be both manual trades and EA placed trades. I believe I...
Hello,   i'm getting this error only in BACKTESTING, here's a pic.       As you can see i'm trying to close a Basket when a when an opposite signal is generated.   Here's the OrderClose() code for Sell orders, the same for Buy orders for(int i=0; i<OrdersTotal(); i++)        {...
[Deleted]
Hi guys!   I run multiple times an EA at the same currency and same date but the report is different each time. The number that i look from the report is the Total Net Profit.     Sometimes the difference is not a big deal like the photos i upload  but sometimes has a big difference and make me...
New article Universal Expert Advisor: the Event Model and Trading Strategy Prototype (Part 2) has been published at mql5.com: This article continues the series of publications on a universal Expert Advisor model. This part describes in detail the original event model based on centralized data...
Hi Everyone.  I need help again, please.  I would like to incorporate the following into my EA, but it is completely ignored.  Why does the EA not call the Maxlots function?  When I run the EA on the Strategy tester, the Lotsize go much higher than my input.  Thank you.  EDIT:  Also I just noticed...
iMAOnArray returns wrong value when it is working on array passed as function's argument. The code below shows that iMAOnArray returns diffrent result for argument array and local array though they are equal.  It seems that iMAOnArray caches array data on first call of PrintArrayMA. loop0:...
Hi, I'm trying to alert for weekly High and Low price, I'm using this code:       double Alert_To_W1_High = iHigh(Symbol(),PERIOD_W1,1);      double Alert_To_W1_Low  = iLow(Symbol(),PERIOD_W1,1);      if(Ask+1*Point >= Alert_To_W1_High && Ask-1*Point <= Alert_To_W1_High)         Alert(Symbol() + "...
People thanks very much for the help. you help a lot and i am very grateful for the help in my learning.   In my studies, I'm trying to terminate an order if another order is closed.   Example SHELL:  if Order(1) OrderOpenPrice()-20PIPS then Order(2) CLOSE. I can not imagine how to program! please,...
[Deleted]
  er returns error  (6)
hello//+------------------------------------------------------------------+#property copyright "Copyright 2015, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strictextern double lot          = 0...
When i try to open a shortcut with FileOpen(), it opens the shortcut file itself, instead of file this shortcut is pointing to. I thought that the shortcut is actually a link in some OS layer, but it obviously isn't. Any ideas how to solve this? 
  CPU usage 100%  (9)
I am experiencing a problem whereby task manager shows CPU to be nearly 100% occupied with (demo account) terminal.exe. This only occurrs when the EA has been running for a long time (2-3 weeks). Logs show no activity at this time and trade profits are changing on ticks as expected. Memory usage is...
Hello, I have a normal programming experience, tried many different strategies, I want to create something new and interesting. Please advise me on an interesting strategy based on indicators. I would also like to use some indicators to help out my forex trading
Function definition - what is wrong? int getInt2Index(int i0, int& arr[][]){ causes '[' - invalid index value    Defines.mqh    581    36 Char 36 is the 2nd [ Even a int getInt2Index(int i0, int& arr[,]){ causes a ',' - invalid index value    Defines.mqh    581    35
New article Universal Expert Advisor: Trading Modes of Strategies (Part 1) has been published at mql5.com: Any Expert Advisor developer, regardless of programming skills, is daily confronted with the same trading tasks and algorithmic problems, which should be solved to organize a reliable trading...
Good day I just want my EA can open a designated starting time specific operations, and to stop open operations in other specific designated time. And the only robor close open operations. Thank you !!//+------------------------------------------------------------------+//| This MQL is generated by...