MQL4 and MetaTrader 4 - page 462

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)...
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,...
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,...
[Deleted]
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
[Deleted]
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) {...
[Deleted]
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;                   }              }...
I submit the local compiled code on MT4, and find the system prompt error. How can I solve it effectively?
Am i right that MT4 will not store what each individual trade margin is per a trade? Can i select a order and just display what has been put up for this order? I understand i can do the calculation which is very straight forward but things get a little tricky with tiered margin. Thanks for your help...
Hello,  When I try to change a stop loss line with the cursor.  1.- I put the cursor on the stop loss dotted line  2.- Then I click the mouse en two horizontal lines appear and I can only move in horizontal sense. So I can not change the stop loos line.  I saw other people chaging stop loss with the...
Good morning, This might sound like a silly question but do mt4 indicators have compatibiliy with mt5? Thank you.
Here is the code i'm using int OnInit(){   Print("init Year: "+Year());   //---   return(INIT_SUCCEEDED);}//+------------------------------------------------------------------+//| Custom indicator iteration...
Hi All I've searched high and low to try and find a template EA which allows you to refers to an indi with a simple arrow up / down trigger but can't find one. I just wanted to create an EA to trade the attached indi with SL/TP/trailing? I'm not a coder so couldn't create one myself but could insert...
V_LINES are created in the Chart  Window. OBJPROP_BACK, true places the V_Lines behind the buttons in the separate window - as per attached image. The V_LINES in the separate window scroll with the chart window - the buttons remain stationary - The V_Lines above and below the buttons form a...
I'm stuck with this code, i have to find the highest and the lowest in like 161 candel, and that's ok, then i have to draw a vertical line  N candle forward where the price doesn't arrived yet , what is my error? here is the code : void M()   { int max = iHighest(NULL,0,MODE_HIGH,161,0); int min =...
When an EA starts to get fairly large, structuring the code gets vital. Ways to structure.  - Subroutines in main code  - Include subroutines  as mqh  - Include classes  - Libraries I have favoured Libraries. You get a clean interface and good "isolation". During development it is a bit of a...
I was recently looking for some code like new candle but loads at first run then waits for new candle to run indicator faster... and accurate.. But during my tryouts come of wit this solution Time frame independent. Let me share and what you think?...
Is anybody familiar with the GetClassName and GetTitle functions in C++ and whether or not they have equivalents in mql4?
Hey guys,  Brand new to MQL4, been reading the docs and all that, so go easy on me!  Just wondering if its possible to initialize an array with a variable length.   For instance, the following works fine:   double blah[10];   ...Whereas this doesn't':   int arrayLength = 10; double...