Download MetaTrader 5

MQL4 and MetaTrader 4 - page 973

To post a new topic, please log in or register
I am having no luck finding or understanding a way to filter out less than desirable trading hours. My brokers GMT is 0 if anyone can help me with a a conditional statement to add in hours filter. Also I have a signal that is highly reliable under certain conditions but dont want to open trade at...
Hi, I'm fairly new to using MQL4. I've been trying to write an EA where a buy trade is opened if RSI(14) goes above 55, Momentum(14) above 100.2, sells if RSI(14) goes below 45 and Momentum below 99.8 with a take profit/stop loss of around 50pips. I've programmed this but I haven't been able to stop...
I'm somewhat of a VB convert to MQL4 and am trying to figure out some demo code that I found. I'm running back testing with this piece of code, and have noticed that sometimes my stop loss doesn't seem to set at all.....it will enter into a position and just sit there, sometimes for days, and then...
Hello, my name is Andy and I'm a computer engineering student. This is my first meta4 expert adviser program, can anyone tell me whats wrong with it. Function. Its an EMA 9.33 program, its supposed to open only one position at a time and this happens on signal cross....
I'm sorry if this has been answered already,  I did look but didn't find it. I have coded a few simple indicators and scripts.  I have 2 platforms that I use and one shows an extra decimal pace compared to the other,  e.g. GU  1.5129  vs  1.51294  What I would like to do is be able to modify my code...
I wrote a small script to learn how to use FileRead and FileWrite. FileWrite works OK, becauseI can open the resulting CSV file in NotePad to see the data. The problem is reading the data back into MT4. The script has an Alert in it so I can immediately visualize the data read back in. Only some...
G'day again. I'm wondering if someone could kindly add an MA cross to the following code: extern int TakeProfit = 155; extern int TrailingStop = 55; extern int StopLoss = 55; extern double Lots = 1; extern int magicnumber = 777; extern bool PolLots = true; extern int MaxOrders = 12; int prevtime;...
Hi, I am having problems coding my first custom indicator. ye i know this forum gets a lot of these posts, sorry =(. Basically, what I am aiming for is for this indicator to give me a certain probability, so to speak, of what the how the next candle will behave--based upon the data that I have...
When referencing terms, sometimes it is said "Line index must be from 0 to 7. What is "line index" and what is each number mean (0 to 7)?
I can provide further informations for developers. I happen frequently. So you can easily recreate problem. There has been a critical error Time : 2009.11.13 19:29 Program : Client Terminal Version : 4.00 (build: 225, 10 Jul 2009) OS : Windows XP Professional 5.1 Service Pack...
I have just found what seems to be the solution to my Error 131 problem and thought I'd post to possibly help others. The details are as follows: The Robot uses a number of settings that seem to need to be adjusted as follows: 9this may help other people/robot settings): Acconut size - $100,000...
  return(0); (5)
Hello everyone, I'm still learning how to code, can somebody explain the meaning of the function, return(0); in an EA code.? and how does it affect closing of opened orders? any help will be highly appreciated. thanks.
Hi everyone, Is it possible to get the original stop loss value for an order that has been modified several times (ie. trailing stop)? Thanks, Chris
I read that the files with historical info for metatrader5 are smaller. I am guessing the HST file header description changed. Would you mind and share the new format specifications? Thanks em
Hi, this is my first post...this is a really great community..I'm news in MQL, but not in Forex. So i want ask if someone can tell me How I can tell to my expert, after the "8th" opened orders, don'open more orders, but i don't want that it close all the previuos one, all ordres have to reach stop...
New article Trader's Kit: Decorating Indicators is published: In this article you will find main tasks when decorating indicators, their solution and automation. Author: Андрей
Recently realised that the old tick error is quite often, anyone experienced that and any solutions to that?
  EMA-4-MTF-Strategy (15   1 2)
EMA-4-MTF-Strategy Timeframe: 10 sec, 30 sec., 1 min, 5 min, 15 min, 30 min, 1h, 3h, 4h, 1 day, 1 week Currencies: all Exception to the rule: 10 sec TF - only EUR/USD Indicators: EMA: 9, 20, 55, 120 Enter/Exit: when bars crosses EMA 9 Hold: when EMA 9 20 (bullish) inoperative: Commencement of risk:...
  MT4 RSI EA (1)
I am using RSI Ea and needs a small modification. RSI EA sells whenRSI value moves over 70. This sells when RSI is over 70 till 99.99. Ineed to restrict this to a range like RSI value 70 to 71 only and BUYfor 30 to 31 only. I think the following line of code needs to bechanged. RSi is attached for...
Hi, Im newbie in mql, can anyone help me to make indicator to show an arrow, if there is a bullish candle above an MA 20 and if there is bearish candle below an MA 20. Thanks in advance.
Hi, I'm a newbie semi-programmer wannabe (have been playing with code for a while now, can do only as far as amend and create new entry/exit rules in a template that a friend has put together for me, but he is unavailable at the moment to help me with this error). I get the following problem (from...
PLEASE put SEARCH capabilities into MQl4BookEnglish.chm
It can get a bit tedious in this forum you know. There are so many posts from people who can't code, can't use grammatic syntax (never mind programmatic syntax) and who just want others to "help me please" without spending any effort at all themselves to learn how to code and to read the docs. I...
I have a chart with this code on it. However, when I am on the 15min chart, it alerts me every 15mins instead of just the once per day that it is supposed to. Any ideas how I can get around the Time[0] variable?    //------------------------------------------------   //any TS/KS crosses on D1...
Hi, my question is about how can I send an order on a specific time in the future. I mean: let's suppose now it's 20.30 (8.30 pm) and I'd like to put a buy order to go long on 22.30 (10.30 pm), may be because some news will come on that time. Let's even suppose that I'll not be in front of my...
Where would I download MetaEditor? Could someone please send me the link? I presume this is where you would write the actual code to write your own Expert Advisor. Thank you!
search for something you know was asked a thousand times. nothing shows up. edit: works, no excuses not to search for your answers before posting now :)
i forgot my account's passwords...can any1 help me?...
anyone can help? how can i code to count the average ticks per minute?
if((OrderSelect(k,SELECT_BY_POS,MODE_TRADES))&& OrderMagicNumber()==MagicNumber21 && OrderProfit() >= 38) { OrderSelect(i, SELECT_BY_POS); int type = OrderType(); bool result = false; switch(type) {...