MQL4 and MetaTrader 4 - page 864

if I use +GMToffset in start/stop hours it will not work ... how can this be solved? fex: int extern FromHour = 8;int extern ToHour = 14;int extern GMToffset = 1;if(Hour()>=FromHour+GMToffset && Hour()<=ToHour+GMToffset) return(0);
Hi MQLers, after I have called OrderSelect, a couple of instructions later (like OrderType, OrderSymbol, ...) I am calling OrderProfit and I doubt this call returns the correct information. Therefore my query goes - all of these Orderxxx are supposed to be performed on a 'selected order'. I do not...
[Deleted]
Can someone show me some code simple code that will allow me to capture the high and low of a Bar at a specified time? For example ... how do I capture the high and low of a bar at 1:00 GMT?
I am using the iMA() function, but the values of the data obtaining by the function only produce a price up to 4 decimal places when it should be displaying pipettes (fractions of a pip). For example, if aud/usd is at 0.91236, iMA only uses 0.9124. I want the EA to display all 5 digits.
[Deleted]
Trying to access data from Excel file using Excellink. All OK at first Tick when indicator dropped onto chart ie reads and writes to file but when I later try to access Excellink reads only 0 data value. Problem appears to be Handle which on 1st pass = 0 but on subsequent accesses = -1. Error code...
My EA is a scalper. The logic I have of a good scalp works many times, that is the trade is positive.. but sometimes not. I have discovered that when the trade does not complete fast automatically either with my target price or stop loss exit, that means the quote goes on sideway and it is better to...
By "external" I mean an EA outside the folder that contains the Terminal. Say I have more than one account. I want to keep only a list of variable values with each Terminal, and with those values each terminal run the same EA from a third folder. Can this be done in MT4? Or will the Terminal forever...
[Deleted]
I wanted to ask you a couple questions that have got me baffled. Since MT4 has moved to and past build 500, some (actually most) of my older indicators from different systems from the past will not work. I can see them in the correct folders in windows explorer, I can see them in the navigator...
[Deleted]
hi guys, I am new to MQL4 and Meta Trader4 as well as this forum. just wondering how MQL4 works in terms of the Trading functions. Do all the functions required to call the backend server. Please let me explain a bit more my question below. For example: int total=OrdersTotal(); for(int...
[Deleted]
I read an interesting post on the web: "MetaTrader 4 works on a 30 second session length - That is when there has been no trading activity for 30 seconds the "session" times out. Outside of this time any communication with the Server from the same IP address needs to be re-authenticated ie: Go...
[Deleted]
  Hello to all  (1)
Hello my name is Giridhar & I ambasically from India but living in London at a moment. From past 2 1/2 years I am practicingforex daily almost 5-8 hours a day, keeping an eye on charts and understandingsignals.With the help of my friend who is also my mentor I learned so manythings and finally I am...
HI I WANT TO MAKE MY EA TO WORK ONLY FOR ONE FX ACCOUNT NUMBER, CAN ANYONE PLEASE HELP ME TO DO THAT THANK YOU
Hi, I am pretty new to programming and I worked through some first tutorials and now I thought I'd try out different things and see how far I would get. I want to make some market overview in a tabular style. I borrowed some code pieces from similar projects and now I just want do it step by step
[Deleted]
Hello, i have a question, how can i codeing somethink that show me for example that my EA run on EURUSD and GBPUSD chart? is it better to code a info with files or with global variables and how would a good example look?
[Deleted]
What can faster be read and what is better so for the programm performance , reading and writing into global variables or using texfiles
[Deleted]
  Last Line in File  (14   1 2)
I wrote a function to read the last line in a file. I wanted to know if anyone knows a better method of doing that. The idea is to go to the end of file, go up to the next line, move back till '\n' is found. //Returns the last line in a file. Exits with the pointer position at where it was.string...
[Deleted]
Hi guys, I have created some .hst files from .csv for single pairs. All single pairs can be loaded and permanently updated as offline charts (equally to 'period converter'). I have no problems, all is visible and works. But from this pairs I made clustercharts (e.g. USDJPY, EURJPY, AUDJPY, CADJPY,...
[Deleted]
for(i=0;i<=OrdersTotal();i++)            {            OrderSelect(i,SELECT_BY_POS,MODE_TRADES);                  if (OrderType() != 0 || OrderType() != 1)                  OrderDelete(OrderTicket());                  } Hello! I was just wondering that how is it possible with this code to have 3 buy...
[Deleted]
Hi.. There are some EAs that open or close position in a few pips upper or lower than current price... i saw this in some Arbitrage EAs and i remember that those experts used a specific build version of MT4 to trade like this.. does anybody knows how is it possible and how can i code it? or has a...
  time periods  (3)
mt5 has more time periods. is there a way to get PERIOD_M2 , PERIOD _M3, etc... for mt4
Hi: Please share SSRC (Based on Snake Range) Expert Advisor for XAUUSD only. Thanks Ijaz
[Deleted]
How do I code 5EMA shift + 3 I tried the following double emaCHECK = iMA(Symbol(),0, 5, 0, MODE_EMA, PRICE_CLOSE, 3); but the results seems not like what shown on my chart when I do shift +3 on a 5EMA
[Deleted]
Hi guys, I was a user of Metastock and recently jumped to MT4. In Metastock there was an indicator called Linear Regression which I could attach to any other oscillator e.g RSI like a moving avarage. Is there a linear regression of RSI indicator anywhere? How can I find it? Thanks a lot for your...
Hi, i want to find Text value of arrow in my chart. i was checked ObjectFind, ObjectGet but it seems to be don't have function to query Text value of arrow . what kind of method or function should have to use to query name value in Arrow? thanks!
Experts plz make this orderclose work thank yu. any help suggestions are welcome                 int a=1,b=2, c=1,d=2; //VALUES ALWAYS TRUE IF NO ORDERS THEN OPEN 2 ORDERS       //**************  //OPEN A HEDGE**  //**************  if(a < b) //openbuy    {   openbuy=true;   }...
[Deleted]
Hello, when i make backtest or forward test then the MetaTrader write infos to the logfiles, i cannot find this files in MetaTrader installed at windows 7, can somebody say where this files are saved in windows 7?
In many of my indicators I record data in folders organised by brokers. I just 'improved' my code for getting the broker name. If I add the indicator, no problems. However, if I close and reopen Mt4, it crashes. Can't see the program, CPU 100%. If I delete the ex4 file, reopen Mt4, compile and add...
Well. Stage 1 of my MT4 life is complete. I have an EA that earns a good profit on demo accounts. But I think it's too good to be true as profits are directly affected by the brokers' processing times of OrderSend and, in particular, OrderModify. Am I right i assuming processing times are...
I have tested it on two brokers where I can manually open a new trade as "Market Execution" with "Stop Loss" and "Take Profit" options disabled. That's expected, but in fact, when I create an EA, OrderSend() function works when SL and TP parameters are used. It just opens trades as in non-ECN broker...
[Deleted]
I'm testing an EA. I'm having trouble placing stop. Simple. I want to enter the market every day at 14:00. USD/CAD. In candle 1 minute. opened up, the price rise 2 pips. BUY or if the price drops 2 pips. SELL. with STOP 1 pip. and TARGET 80 pips. I am using this code. but it does not work, please...