Download MetaTrader 5

MQL4 and MetaTrader 4 - page 39

To post a new topic, please log in or register
  Help with Backtesting (16   1 2)
Hi Im an advanced trader but just starting to get into Metatrader4. I followed several youtube videos on how to do a basic backtest on Metatrader and I can do all the steps required but then when I press Start my platform never seems to finish the test.  It will run for forever for over half an hour...
Following on from my previous posts I am trying to get the first SAR EA I have written to show results. (For MT4) I have manged to get the default MA Indicators to work and show a result but the first one I wrote myself doesnt seem to be working. I followed this guys instructions on Youtube: https...
Hi, I want to count number of bars from a specified date to current time. For ex. on 2 Mar 2018 12:00PM I want to count how many bars would be there in a timeframe from 1 Mar 2018 00:00 AM. I want to know which function I should use and how? I think its 'Bars', but I don't know what values to put in...
is it possible to make a single notification appear on my mql4 indicator set so that when you change an indicator, you only send me a note? the indicator I have programmed sends me a notification every second until the indicator changes. thank you so much
Hello, Here is the way i found on this forum to get the High and Low of the previous Year : // YEAR LEVELS   double PREV_YEAR_HIGH = iHigh(NULL, PERIOD_MN1, iHighest(NULL, PERIOD_MN1, MODE_HIGH, 12, Month()));   double PREV_YEAR_LOW = iLow(NULL, PERIOD_MN1, iLowest(NULL, PERIOD_MN1, MODE_LOW, 12,...
Is there anyone who can help?  I want good reliable testing data for mt4 platform, 5 min gbp-usd 1,2,or 3 years back if possible, also eur-jpy, eur-usd, usd-jpy, eur-Gbp ? CSV history files, if anyone can help I will o u big time, I am sick of not trusting my results. Cheers Geoff
I'm trying to do my best to find a way to control client keys, without using DLL.  So far the method I'm using, is I use a keygen script that uses AES256 then Base64 on a list of customer names, to create an array of 'serial' codes, and then publish that array to a directory on my website.  Then...
Hi : It is possible to define a variable that contains a value for every bar and this variable is not set as an indicator.    In another word, this is a kind of dynamic array and I want to store some data other than the indicator values.   Thanks 
When I am renaming a a chart object manually and the name already exits on the chart I get an a Journal entry: 2018.03.03 05:59:30.509 Objects Object name test is used already. But there is no visual or audible cue if the Journal tab is invisible, same is true for some other errors that are the...
Hi guys...I don't really know how to do this. Not even sure if it is possible... Problem description: 1)Draw a line from the start of today (day 0) till the end of tomorrow. -The issue I have is that there is no way to draw a line into the future (or I just don't know how). I don't want to use a...
  Reading text file (20   1 2)
Hello All, It's me asking for help again. I have a text file, lets say it's name is "test.txt". The file is contain "100", "200" and "300" each separated by a space (100 200 300). Is there any way to get the "200" or "300" with the FileOpen and the FileRead function? Many thanks
Hi All, I want to parse DOM (Document Object Model) received via WebRequest() method. All I need is to parse it and find desired nodes. Please help to get it done.
Hi all I am trying to read text file using MQL4. the issue I am facing is FileReadString method always returns empty string. following is my code:void OnTick(){      Read();}void Read(){   ResetLastError();       int file_handle = FileOpen("investing_technical_technical-summary.txt",...
Hi guys! so i've been trying to create a Hedging EA but I can't find the reason why I can't send a pending order once the price reaches the stoploss of the other open order. Hope you guys can help! A lot of thanks! here is the code. if(OpenOrdersThisPair(Symbol())>=2)...
I'm looking for programmatically solution of loading entire history for a symbol and a timeframe from server. I can do it manually by opening a chart with the required symbol and the required timeframe and then (unlock Scroll the chart button) by pressing Home and multiple pressing PgUp until I get...
Hello everyone, I ran into a problem that I cannot really explain, so I hope someone is able to explain to me where my line of thought is wrong. I have written a draft version of an Expert Advisor, that is based on Standard Deviation (Entry-Trigger) and ADX (Direction-Trigger for Buy/Sell). However,...
Guys, I'm hitting myself to try to extract the data from the string below. [{"type":"success","message":""},{"id":"14058","symbol":"EURUSD","tp":"1.2271","sl":"1.2217","direction":"buy","risk":"2"},{"id":"14059","symbol":"EURUSD","tp":"1.2260","sl":"1.2190","direction":"buy","risk":"2"}] Note that...
Hello everybody! I am totally new with the mql4 language, I started about one week ago with the book "Programming in Algorithmic Language" by Sergey Kovalyov, and I thought the best way to learn is even to make some practice, so I opened a demo account and I'm trying to do very simpre stuff! Ok,...
Is it possible to create a script that allows you to automatically close a specific order when another order is closed? Example: When I close order number 2845626, I would like it to close order number 2845628 (automatically) Thanks you
I have to turn this request into a loop.... "Close all orders with a comment equal to null when there are no more orders with a comment not equal a null" can anyone help me with this script?
Is it possible to send an OrderSend from a php script to an EA loaded on MT4? Not sure what to Google for to find the right info. Any ideas?
hi, everyone, does any one has the old version  mt4 version for thinkmarket broker? i mean the old version which before  10.1 2017 ? if you have please share here, i really urgent use. thanks!
Hey everyone, A few weeks ago, I undertook a personal project to automatemy trading system.  Progress is going surprisinglywell for someone with minimal programming experience – mainly due to this forumand all of the available source code I was able to copy/paste from.  I am at a point now, though,...
(Sorry for my bad English) I try to calculate DEMA and I got wrong value when I compare the value of DEMA with this website (http://www.forexlive.com/LiveCharts). I have no idea about the reason that make my DEMA value different to DEMA value in the website. I want to calculate a DEMA value with...
Dear pro, I try to code EA to alert if bar length > 20pip in M15 chart. But when running, alert is continuous and cannot stop. I just need alert 1 time/1 bar. Pls help me to check code below. Thanks a lot! void OnTick()   {     double a = iHigh(Symbol(), PERIOD_M15 ,0);  double b = iLow (Symbol(),...
I want to create a function similar to: void  Print(    argument,     // first value    ...           // next values    ); or uint  FileWrite(    int  file_handle,   // File handle    ...                 // List of recorded parameters    ); Example function: bool checkCharacters(argument) {...
Hi everybody! This is my very first message on this board, so I thank you in advance for the help you will kindly provide me with. I would like to have some hints about the best way to make mql4 interact with external programs, written in a different language as it may be Python. The task I'd like...
phuonglan19
i want file .mql4 such :robot will deleted pending orders after I order those around 5 minutes or 10 minutes or 15 minutes and more... if pending order did not excute.  Thank you very much
How can I change the maximum lot size an EA can trade with in MT4? And how can I activate 'autotrading' for each forex pair separately in MT4?
CurrentPrice = Bid;              while((Bid-OrderOpenPrice())/_Point > TakeP*3/4){                  if(Bid > CurrentPrice){                   CurrentPrice = Bid;                   TakeP = (CurrentPrice-OrderOpenPrice())/_Point;                   }              }...