MQL4 and MetaTrader 4 - page 573

I am not sure if this post is an acceptable subject of this forum, but I know of no other platform to raise this matter. We all know that Metatrader is the most popular trading platform in the world. MetaQuotes is spending a lot of energy, time and money in developing MT5, which until now has had...
  functin errors  (5)
Hi I get 2 errors on this function #property strict#import "stdlib.ex4"#importvoid    CloseLongTicket()        {           for(int i=OrdersTotal()-1;i>=0;i--)           if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true)              {                 if(OrderType() == OP_BUY)                 bool...
Hi coders, if I have opened 20 charts I only want some calculations done on the chart I am currently watching. So it might be useful for an indicator to check if a chart is currently active. I found a solution here: https://forum.mql4.com/30084#276651 but this posting is from 2010 and I wanted to...
[Deleted]
Hi guys, i loathe to ask this, as i'm sure it's going to be something very simple, but I've exhausted all the avenues i (knowingly) can explore. I''m receiving an out of range error message, located at (according to the info provided in the terminal experts tab) Ln 222, Col 25. This is the line...
Is there any way to change the strategy tester speed to something between 31 and 32 in visual mode? 31 is a bit slow, 32 is too fast.
please have tried to make the arrow appear after the close of the signal candle in other to avoid repainting but all to no avail. please help me out , below is the code. <Decompiled code removed>
I want to add line in specific range OBJ_HLine Draw line in Complete Window i just want to draw line in specific range    
Hi,  I am having another application which is writing values in a csv-File. This application is done from another programmer and I can do nothing on it. Now I was reading the data for a while and it worked fine. Now - I don't know what happenend I can't open this file anymore... I thought perhaps it...
  Alert accumulates messages  (15   1 2)
My alert() function accumulates messages each time it triggers. I want it to output the messages only once and not to accumulate it in several lines. Somebody may help please. See picture below for perusal. The required message is the one above while the unwanted messages have been highlighted in...
I'm trying to group some common functions into a library of my own and for some silly reason can't get things to work.    In my rlib.h file (located under "...\MQL4\Include" I do the following):   #property copyright "xxx" #property link      "xxx" #import "rlib.ex4" int     subGetMagicNumber(int...
what is the best way to make a flag using the ObjectCreate function or bufferI can not seem to distinguish between the two I find indicators with 0 buffer and others with buffers please can any one explain to me tje difference thank you
Hello, I have a problem to assign values to different local variable, I have 5 position open at different prices but my script gives the same value to 5 different variables Where is the problem??? thank you for any help
[Deleted]
Hi all, This is my first attempt at programming an EA. I am running into a error everytime i tried to do backtesting for my EA. Error is OrderClose error 4108, and unknown ticket for OrderClose function. I can't seem to find any bug in my code + the error seems to happen at random, i.e. the code...
Hello everyone,   I am kind of a newbie. I would like to know if it is possible to give backtest start and end dates dynamically. I want to run a code more than one different time ranges. for ex: first I will execute the code for January and then for February etc... I do not want to use a larger...
  Array or not to array  (29   1 2 3)
Hi Guys.... thanx for any input Could someone please point me in the right direction here.... I am trying to create a function (well 2 - Buy and Sell positions) that will provide me with the following information: For all open Buy positions that are in a Loss: 1. The Order ID of the "furthest" Buy...
Hello comrades, how can I instruct my broker to place pending orders or direct orders at a particular price on a future date or even close orders, without having to use Expert Advisor? One cannot be on line all the time.
[Deleted]
Hello all Is there a compatability problem with MT4 on the Microsoft Surface pro 4 tablet?  I managed to load the MT4 platform and it was working, but when I tried to load it again a few days later I got a frozen screen and no live data. Just wondering if anyone else has encountered the same...
Hello all, If you are not aware about it, you have to know that Metaquotes is pushing hard for traders and brokers to adopt MT5. They are currently developing MT5/mql5 to fill in all the missing features that prevent the switch to MT5 from MT4. MT5 allow now to hedge/lock in a similar way to MT4...
Hello, are the ticks while running the Strategy Tester 1) automatically generated or 2) are the same as delivered by the data provider (e.g. FXCM)? Thank you!
[Deleted]
#property copyright "Copyright 2016, MetaQuotes Software Corp." #property link      "https://www.mql5.com" #property version   "1.00" #property strict extern int period1 = 50; extern int period2 =150; void OnTick() { bool bill; bill = rsi(); if (bill = 1) { ordersendbuy(); } else if (bill = 0) {...
[Deleted]
Hi, I have a few orders open for different currencies, how can I find is there an open order for certain Magic Number?
[Deleted]
Hi, has anyone heard of brokers restricting the 'OrderCloseBy' function? I don't want to waste time opening an account with a broker (such as IG Index) that does not allow this function. I would effectively be crossing two lots of spreads. I was wondering if anyone knew if this is a broker...
New article Applying fuzzy logic in trading by means of MQL4 has been published: The article deals with examples of applying fuzzy set theory in trading by means of MQL4. The use of FuzzyNet library for MQL4 in the development of an indicator and an Expert Advisor is described as well. The...
New article Deep neural network with Stacked RBM. Self-training, self-control has been published: This article is a continuation of previous articles on deep neural network and predictor selection. Here we will cover features of a neural network initiated by Stacked RBM, and its implementation in...
  Trailingstop EA won't work  (40   1 2 3 4)
Hi Everyone. I cannot get my EA to work properly. I am running it on 10 different pairs/charts simultaneously. There seem to be two problems: 1. It does not trigger the Trailingstop most of the time. Sometimes it works, though. I think the problem lies with my OrderSelect, but cannot resolve
[Deleted]
I was practicing to make a simple E.A.but the following errors occurs . "        '}' - semicolon expected                             " "        'else' - illegal 'else' without matching 'if'       "  Can anyone please point out my mistake in the following program  and make the correction. #property...
Hello As there is clearly only one correct answer to the question, 'How many pips of profit does my current trade exhibit?', I'm interested to see the most efficient way of coding this. I could work this out from reading, but I'm concerned about missing a vital point, and wondered if someone would...
[Deleted]
is it possible to give an array as a return value, like this? double[] function23(...){   double erg[3]; ... return (erg);}
Hello For a while I've been using the following lot size calculation in EAs, and more recently in a script I can drag onto a chart for it to do the lot size calc for manual trades automatically.  My trading partner said, 'wow and it handles situations where the base currency is GBP and the pair for...
when i send my expert advisior ex4 or mql4 to another folder or another device code dont work in tester , what should i do ? any idea ?