Download MetaTrader 5

MQL4 and MetaTrader 4 - page 458

To post a new topic, please log in or register
suppose I want to enter a trade when one condition just occured and another occured in the last 4 bars. how do I code that? for example, if I want to buy if stochastic crosses above 20, and RSI crossed 30 in the last 3 bars, do I need to define RSI for the last 3 bars and then code that? can I use a...
After running a visual test of an EA, is there a way you can save the chart so you can open and use it again? and analyze trades?
I try and try, but I can't do. I know is the logic. please help. Thanks for the help.      /+------------------------------------------------------------------+ //|                                                    i-HighLow.mq4 | //|                                          Copyright © 2007, RickD...
Hi,  Can you help me? Upper Shadow and Lower Shadow is missing (See images). I installed MT4 in HTC One (Android OS, v4.1.2 (Jelly Bean)).   How to display the Upper/Lower Shadow on the Candle Stick Graph? What is Upper Shadow and Lower Shadow, please see image below  
Hello, I have a question if I have something like this:if (condition){Bool x=true; for (int i = (total-1); i >= 0; i --) {if ( OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) if(OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) if...
dear friends I downloaded the EA Snowie some days ago but when I compile it there is an alert message saying: function "convertBoolToStr" is not referenced and will be removed from exp-file. so i can not add it on my platform's charts. please i will be glad to hear from the programmer of this EA...
anybody know how to get historical data? I saw "FileOpenHistory" function but no function on how to actually read the data. any ideas? Thanks Eli
MT4 used to have a mini terminal that allowed you to enter a position with a SL and TP at one click though i dont have this terminal any more Can anyone help me with this? thanks Dan 
Hello Smart MQL coders, I need some help with this News Breakout EA. Just started learning mql days ago. My idea for this EA is to create both a pending sell and pending buy order at a distance from the price at a certain news release time. I am having problem coding to close out other opposite...
Here's the correct one of phy code in start() function int start()  {   if(oldTime != Time[0] )      {      // first tick of new bar found      // do something useful      oldTime = Time[0];      }   return(0);   } I'm trying to get and ea to open an order at the start of each bar, and no other time...
New article MQL5 Cookbook: Developing a Framework for a Trading System Based on the Triple Screen Strategy is published at mql5.com: In this article, we will develop a framework for a trading system based on the Triple Screen strategy in MQL5. The Expert Advisor will not be developed from scratch....
for(i=0;i<=limit;i++)       {          double xy=MathPow(bar/2,2);           count[i]=0;          ave[i]=0;          chazhi[i]=0;          countpingjuncang[i]=0;                                              for(x=i;x<=i+10;x++)                     {...
//+------------------------------------------------------------------+//|                                               台湾鸟-波动率.mq4 |//|                        Copyright 2012, MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Hi  I am creating a buffer of 20 elements to store profit for last 20 ticks .. want to calculate a weighted average from this buffer.  However my buffer variable ProfitBuffer[i] which is declared a global seems not to hold any value. Any ideas why ?  Cheers // Gobal declaration double ProfitBuffer...
  EA Coding (1)
How can I set the stop loss at certain level of loss (5) and  setting maximum lot size? 
I wrote an article and submitted it for publishing on this MT4 site over six months ago. Since that time is has just sat there with the "ready for publishing" sign, but no messages or responses from admin. I think that it is the admin which is responsible for finally publishing it, and there is...
How do I make an EA give comments so that I know how the trade was closed? (like if it was from trading condition 1, 2, 3, etc, which you coded.)
Hi everyone,   I'm new here and I would appreciate if you could help me with these 3 questions: 1. I'm developing a trading strategy on FOREX markets which must close all open trades and cancel all existing orders at about 0:00. The easy way to do this is with "if" statement (if timeCurrent = 0:00...
Does anyone know the GMT offset for back testing in Alpari UK? Also, does anyone know if the metaquotes data timestamp is on GMT or has an offset?
Hi, I have created EA thatshould be trading based on the below rules. However something is wrong and Idon’t know what. 1. Buy - Candle Close(2 shift) < Adaptive Gann High-Low activator && Candle Close (1shift) > Adaptive Gann High-Low activator 2. Sell - Candle Close(2 shift) > Adaptive Gann...
i use the EA expert to backtest my EA. But there is some error with the part of code below. the journal said "ticket for OrderModify function must ba an integer". Does anyone know where the error is? double Ticket;  double TrailingStoploss;  double highest;  double lowest;...
Hello, I have decided to start learning MQL4 and I have created my first Expert Advisor. I just wonder if you can give me any feedback, comments if my approach is reasonable or if there are no unnoticed glitches in the code I have created. Anyway, I would appreciate comments :). extern double Lots =...
Just downloading and installing Metatrader4 by itself crashes my computer (Windows 7). The installation green bar nearly completes its journey from left to right but stops with less than 5% to go and the mouse is frozen.  Not even control alt delete will work.  I must shut down manually. This...
hi.. this is my first thread in this great forum.... i spent two weeks reading threads and trying experts, indicators,scripts...   i want to trade formedium to long term...most of demo accounts offered by companies expired after month...altrade  demo stay for 3 months before expiry but lastly they...
Hi all, I want to discuss about writing a script that could inverse a currency pair. I Got the below script from this topic: https://forum.mql4.com/35535 and i make some changes to get the real data from market. But when you open the offline chart, the output of this script does not update in real...
Mt4 downloaded from a broker cannot access an account opened by another broker, is it true ? How about mt4 platform downloaded from Metaquotes site ? Can it access any account from any broker ? Does Metaquotes supply free-download multi-terminal Mt4 platform ?
Hello all, I have a simple indicator "_iCustomIndicator" which draw a simple MM ! It works fine ! Now I want to import it into a EA si I wrote : #import "_iCustomIndicator.ex4" at the top  of my EA ! Compilation ok but nothing is drawn !!! What is wrong ? Thanks 
Exist other way how identific demo account (besides function IsDemo() ) ?
As the subject implies, I have a problem running back test on MT4(build 500). Running the same setup on the same(Alpari) data, gives different results. This happens even wwith the MA-sample coming with the installation. Running on 1H(converted from 1 minute) 3 month, 76 trades.  I get both +results...
With my copy of MT4 that I downloaded from MB Trading, I have limited chart history data. On a monthly chart, my oldest candle is for October of 2007. I would like to expand the history all the way back to 1992. How do I do this? Thanks!
1...451452453454455456457458459460461462463464465...1244