MQL4 and MetaTrader 4 - page 604

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...
I back tested my strategy.  When I click Open Chart after the test is done, I saw a black background, green bars, and the trades entry and exits on the bars.   I wanted to visually backtest and make sure that the EA was entering and exiting as I wanted, but I was not able to add any indicators or...
Market data on chart is stuck on the extreme left side of chart. The problem occurs when i open chart windows for futures markets but not in other markets. The problem does not present itself on the smaller time frames, such as the 1 minute, 5 minute, etc.. It only occurs with the 4 hr, daily,...
Hello. Please help, i think this is really simple but i don´t know how to do it.  I need help modifying an EA that i have coded and adapted. I want to modify it such that, once a fractal is used as a signal to open a trade, another trade will not be opened based on the same fractal. This is to...
[Deleted]
Hi, This is driving me nuts and most likely a very noob questions (I apologise in advance).  Im trying to write an oscillator that shows the percentage difference between the close price of the candle vs the close price of 5 candles prior.  It seems to work however the last 5 values before the...
  Tralling Stop  (4)
heeey gus!!! It is a pleasure to be in this forum. The forum helps me a lot in my studies. =) Thankss!!! People,I can not place stop when the price reach a value. Example: price is 1.50 Stop in 01.30  if(Ask+50*MyPoint>OrderOpenPrice()) modify = OrderModify(OrderTicket(),OrderOpenPrice()...
[Deleted]
THE PROBLEM:  I've got an idicator in compiled version only and I'm trying to figure out how to implement it in my EA.  IDEAS: - figure out how my EA could read the color of the chart. - iCustom returns the value of the indicator, not the color, and it is the color that I need  - "reverse engineer"...
Hi,    I've been unsuccessfully trying to start  from powershell command line the terminal.exe program. The .ini file look like this :   ; common settings Login=2089020454 Password=7ze45v3u EnableNews=false ; experts settings  ExpertsEnable=true ExpertsDllImport=true ExpertsExpImport=true...