Download MetaTrader 5

MQL4 and MetaTrader 4 - page 460

To post a new topic, please log in or register
Hi, my trendChange variable is howing up as false even though I set it true at the beginning. It never changes during the whole run. This variable is a string but I tried bool too and it only gave me 0 in the printout. What am I doing wrong? bool     openTrade=false;int      ticket;double   current...
  ICHIMOKU STRATEGY (38   1 2 3 4)
I've been trying to create an expert advisor which will automatically buy 1 unit when the tenkan-sen>kijun-sen (when the tenkan-sen line is above the kijun-sen line) and then sell it once the tenkan-sen is lower than the kijun-sen. I'm a complete newbie and started it yesterday by trying to piece...
Hi I am looking for a custom indicator to be made . Should be really simple to do . All I want is horizontal lines to be added at specific distances when I place a trade ( or place a line / indicator ) at a price point. Once a price is shown, I want lines to appear at ZERO ( a given price) and...
It would be very nice to have the chart selection bar above the charts and below the toolbar to allow quicker movement from the toolbar to the chart selection bar and vice versa. I do a lot of multiple time frame analysis on multiple charts and switch back and forth many times. Having to to go from...
Dear, I am getting problem about double value condition: I wrote code below: double am0_13 = iMA(NULL,PERIOD_M5,MA2_5min,0,Mode_EMA,MaPrice,0); double am1_13 = iMA(NULL,PERIOD_M5,MA2_5min,0,Mode_EMA,MaPrice,1); in the chart MA1 show = 1.53977 and MA2 show = 1.53975 When I write...
Hello, When I run the attached EA in Strategy Tester I get the following in the Results tab. The entry in bold is the one I don't understand. This EA hedges a trade between a buystop and sellstop while doubling lotsize as price reverses and sets takeprofit and stoploss at equal opposing levels. As...
I've noticed my phone only alerts me to a push notification when I open the MT4 app on my phone. It won't vibrate when the app is closed. This severely limits the use of the notification. Is there any way I can get the notification vibration as long as my phone is on, even if the MT4 app is closed...
This kinda follows on from my previous question - https://www.mql5.com/en/forum/146554 I contacted Birt about the issues with the dates... His suggestion was it could be related to the way my EA is coded (no surprise really, as this is all still fairly new to me). His thoughts, that it could be...
Hi MT4 develpers, It takes a while to horizontally scrol the chart to the begin of the test period (testing without chart). Would you be so nice to include such button in your next build? Many thanks at forhand ! Regards, HansSpain
New article Expert Advisor for Trading in the Channel has been published: The Expert Advisor plots the channel lines. The upper and lower channel lines act as support and resistance levels. The Expert Advisor marks datum points, provides sound notification every time the price reaches or crosses the...
We have implemented a number of changes to Signals statistics to simplify evaluation of results. Now, you can quickly assess the trading activity of a selected signal, as the informative value of the charts has been considerably improved. First, Growth and Balance charts now feature...
I've had this great indicator that had been doing very very well trading the 4hr time frames. I've had my go with coding EA and haven't been able to pull it off. The idea is that when the indicator turns green buy and red sell and to close the trades when the color changes. Below is said indicator,...
I have noticed that my broker sends mail to the MT4 platform at critical trading moments, which slows down or crashes MT4. This is OBVIOUSLY another scam build into MT4 to attempt to make trading more difficult. So many scams, so many tricks . .... .... ....... Is there a way to 'Completely and...
I found this indicator and I want to make an EA of it but I'm stuck at one value. No, I don't have the source code, otherwise I wouldn't need your help. If you attach this to any chart, you will have 2 horizontal lines (usually the same value in positive and negative). I need to know how these 2...
I know nothing about programming (proven by my 3 hour attempt to write software for an EA where I became utterly lost), but I have a trading system for Forex, metals & indices which has performed exceptionally well on paper. It has made profits on 22 out of 25 entities on which I tried it I am keen...
this Is part of my code I want to change it and mt4 automatically calculate last 2 day: extern datetime GOBACK = D'2015.08.30 00:00';extern datetime GOBACKtill = D'2013.08.29 00:00';int start(){   int countedBars = IndicatorCounted();   if (countedBars < 0)       countedBars = 0;...
The indicator is https://www.mql5.com/en/code/10928 and the certain bars are the ones with arrows.
Hi there, i am just reading the MQL4 Book und i have a Problem to undestand this Part of the EA "tradingexpert". Concret the part with counting the Market orders. If i have two market orders, the variable Total gets the Value 2. But in this case the Condition Total<1 is not fulfilled and the Alert...
I would hope and think that this one is easy, I'm just too new to MQL4 programming to do it yet... Can anyone out there build me a simple indicator that is similar to the Moving Average indicator of Period: 1, Shift: 0, MA Method: Simple, Apply To: Median Price (HL/2) Style: Blue line BUT... replace...
int PrevBars;double tp_buy_ord1,sl_buy_ord1,tp_sell_ord1,sl_sell_ord1,pipekolly,pipekolly1,tp_buy_ord2,tp_sell_ord2,tp_doubled,price_ord1,roundpipekolly;#include <stdlib.mqh>#include <WinUser32.mqh>// exported variablesextern bool FiveDigitBroker1 = false;extern bool ClearAllObjects1 = false;//...
Can somebody please help me...why i'm getting "zero divide" error when i load that indicator...... int periods = 24;double buffer_indicador[];int i;int maxbars;int init(){   if(IsTesting())     maxbars = Bars;        else          maxbars = 500;                  SetIndexStyle(0,DRAW_LINE,STYLE_SOLID...
Hi all Im backtesting GBPUSD but with data from EURUSD I get the correct value from double high_1 && double low_1 But the double high && double low i will get the open price on current bar not the high and the low? What am i doing wrong? double high_1 = iHigh("EURUSD", 0, 1);Print("high_1 is ",...
I'm new to this.. Trying to define a to be set at a global variable perdefined value in init(). If I place it within the {} all references to it compile errors as undefined. If I place it outside of the {} I get a "; is expected" at the declaration of the variable. Result no compilation of the EA...
Hi There, I am looking at software updates. I want to know which ea builder te best is. Can I have some imput please? JH
Hi does anyone if it's a EA out there witch can work like this. For example: I put in "this new" EA on GBPUSD chart, and i have a EA based on two moving averages running on the EURUSD chart. And when the EURUSD EA is buying in a MA cross i want the "new EA" on GBPUSD open a buy at the exact same...
Another one book about MQL is available: Expert Advisor Programming: Creating Automated Trading Systems in MQL for MetaTrader 4 by Andrew R. Young. Annotation: Finally, the first comprehensive guide to MQL programming is here! Expert Advisor Programming guides you through the process of developing...
i can't understand WindowExpertName()'s mean,please help me
int fuction(string a) { int b; for (int i = StringLen(a) - 1; i >= 0; i--) { b = StringGetChar(a, i); if ((b > '`' && b < '{') || (b > '? && b < 256)) a = StringSetChar(a, 1, b - 32); else if (b > -33 && b < 0) a = StringSetChar(a, 1, b + 224); } int...
  Not allowing trade (11   1 2)
Hi, I need my EA stops to open trades if the last trade closed time is not > 10 min I use 1 min chart graph. So for example: If the last long trade has been closed @ 10:30 so EA must not open long order before at least 10:40... but it could open short trade. Please help Cheers
Dear mql4 forum I'm currently trying to build my first EA. Everything goes well, except that I am not able to read the values for support red / green trendlines from the indicator (please verify the print-screen) Even though I can get the current trend with (Trend_TF = variable of desired timeframe)...