MQL4 and MetaTrader 4 - page 639

To post a new topic, please log in or register
Hi, By using iTime() I found an interesting situation I have opened the USDCHF M1 chart, and put into a script Print(iTime("USDCHF", PERIOD _M1,0)) it returned with 0. When I replaced "USDCHF" with Symbol() , Print(iTime(Symbol(), PERIOD _M1,0)); worked well. Can somebody help me ? Thank you F.
I have two MT4 sessions open, each logged into a different account (on different brokers).  I wish to take a value from one terminal and pass it to the other (one way only).  The File Open, File Write, and File Close functions can only operate in the parent directory of the terminal that is doing...
what is the benefit of OrderCloseBy() ,compare to Order Close ?  
How can i run an expert advisor on my Android phone?
I want to know how many cycle imbricated can be supported in mql4 ? I use more than 10 cycles imbricated in my EA and I want to make sure that no bug is diverted from it. I want to know it like Excel that support less than 7 cycles.
Good morning, Is there a way to force the indicator to reload from scratch? Like WindowRedraw but for the indicator. Thanks!
Dear all,   The code attached is  used to detect the number of peaks and troughs in the current chart(the chart I used the EURUSD of period 1 hour) . But the scripts always alerts "0  peaks and 0 troughs" at the end of the script while I can clearly see the peaks and trough on the chart detected by...
Can you please recommend a general programming book that will definitely improve programming skill (even by little) after finishing all the exercises in it and studying its algorithms. I would appreciate it a lot,and I guess other will too.
Please tell me if I leave the return operator with zero "Return(0)" Will it save the value of StopLevelThisPair() function inside BrokerStopLevel variable which is a global variable? int start()  {   Comment("The Current StopLevel is: ",StopLevelThisPair());   if(OpenOrdersThisPair(Symbol())>=1) //...
Can I modify an external variable as my expert is running? I have an extern variable takeprofit = 400; but Id like to change it to 450 when I have a total of 5 orders in the market, but when I count the orders with a for statement, and ask that takeprofit=takeprofit+50; but it doesnt add my...
  copyrates (1)
Hello,     May I ask everybody how they would implement the MQL5 function "copyrates" in MQL4?    Thank you,        Eric R
Anyone has experience with xxxxxxxxxxxxxx managed account service ? here is their account performance https://www.mql5.com/en/signals/mt4/xxxxxxxx
hi can any one give me opposite trade copier, in which master a/c trades will go exactly opposite in slave a/c. 
Hi there, i need a little help on condicions:    lets say i have 2 buy stop and 2 sell stops wainting when the buy stops activate and became buy, it well delete the sell stops remaing, but if only one buy stop became active it will do nothing.  my difficult is in the condicion, if it's an IF, While,...
Hi   I would like to add a Max Spread check function, and have the various ccypairs already set with the tolerance, so that I can just drop the EA on whatever pair and not worry about remembering to set it.   I tried to create a switch that would return either true or false that i can then just use...
Hello Everyone, I find a weird problem with data in MT4. I go to the history center (F2) to download data on D1 of GBPUSD. By chance I find that on the day 2013.05.22, there is big difference between downloaded data and data on chart: On Chart: Low:1.50192    Close: 1.50461 CSV file:   Low: 1...
Hi,       I am using MetaTrader4 downloaded from this site. While compiling the EAs  and an Indicators it creates mq4 and ex4 files in  " C:\Users\username\AppData\Local\VirtualStore\Program Files (x86)\MetaTrader 4\experts"  rather than   "C:\Program Files (x86)\MetaTrader 4\experts" How can I...
I just installed this software https://www.mql5.com/en/code/10886. On strategy tester  it is giving me good result almost 50% profit in one month but while I am using it on real trade it is not putting trade please help me. How I can use it.
In the backtest, it makes losses. I'm curious how it will be if its orders will be reversed. Originally buy, in reverse will sell and Originally sell, in reverse will buy. Moderator edit: Decompiled code removed. 
Hi there...   Im using the following code to get yesterdays high, low, open and close prices but i am not satisfied with the results... Can anybody here help me with this so that i can get the real high, low, open, close..   tnx..     DateValues=y+"."+m+"."+d+" "+"00:00";int...
Dear all,  I have a problem on the output position of the text object. As shown in the code below, the text object will be out put with the text set to be "the time current." But from the screenshot below, the timecurrent is "2012.09.10", But the text position is located around"2012.08.30". ........
Hi I'm new to MQL4, and I don't really understand forex. I'm programmer and my father just asked me to make for him Advisor, he wrote me and algorithm which I now try to realize.   With his system I need to interact with Moving Averages, so how can I interact with them like: 1. Add/Create new...
Hi, in our Company we have very strict firewall settings. Is there any official sheet containing all needed connections and ports? It seems to be very difficult to set up all the required destination addresses and ports.   Any help would be great!   sidi 
Hi,I want to place buy stop after an ma cross has happened.But I also need to take into the account my ECN brokers Stop Level (distance at which he allows me to place stop orders(sell/buy) from the current price). Please tell me if I am doing it right because it doesnt place SL/TP on the opened...
Hi, I recently bought an indicator protected by mqllock, I went to forum to decompile it but it's too hard to do this job, It seems they use a high protection. The problem is the ex4 file I use make my mt4 very slow and freeze all time. Is there an other site who offers the same protection as...
Hi guys, I'm a new user of MetaTrader 4 and I have a doubt of what to type on the Volume, to complete a trade? My inicial volume of money is $10.000,00. And I'm trying to enter with a volume of 0.10. Is it correct? Thanks 
I have these two sequential lines of code and they output 0. Don't know if it's related to times I've needed to add Print commands to change values (values were wrong when the Print's were removed)  double ma200 = iMA(NULL, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 1); Print(ma200);    Thanks for the help. 
  GetRight (4)
Hi I have been trying to use the GetRight program to download a .csv file from the internet via my MQ4 code, but it is giving me some problems (it refuses to save the file).  Could you please advice, if I can use some other technique to do this, preferably MQL4 code. Thanks in advance. Best regards...
  Ea problem (13   1 2)
cant get the brackets on this ea right One too many {   
Here I have function that checks for MAs cross: void CheckForMaCross(){double PreviousFast = iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,2); // Calculates FastMA on second candle back.double CurrentFast = iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,1);  // Calculates...