Hi, I tried the following code to show my gaps: for(counter = GapsDistance; counter >1; counter--){ if((iClose(NULL,PERIOD_D1,counter)-iOpen(NULL,PERIOD_D1,counter-1)) > GapsMin*pips2dbl && (iClose(NULL,PERIOD_D1,counter)-iOpen(NULL,PERIOD_D1,counter-1))<GapsMax*pips2dbl )...
hi I am wondering if someone can point me to some info on how to get an arrow from an indicator to be read by EA while the code would be nice I would be happy with just a place with this sort of information I haven't found anything from my efforts so far Thanks in advance
[Deleted]
Cannot compile as variable is not defined.....however variable will come from an indicator which will be linked. How can I compile EA that is coded to accept variables from an external indicator?
(13 1 2)
Hi, I am a newbie at this so please be patient. I am practising on an EA that uses an external indicator to pass variables to the EA. However, after coding the EA it will not compile as there is an error message stating "variables not defined". How can I get the EA to compile. Here is the relevant...
Hi, I tried calculate my MAs and my there indicators only with the prices from 9:00-17:30. Does anybody has an tip or an code example?
I am a newbie of coding MQL4 I did not know how to create an assignment which will not be reassigned at every moment a new quote posted. For example, I want to create a function working as follows: ---------------------------------------------- if total=OrdersTotal()==0 then...
[Deleted]
Hello, An indicator can specify through a '#property' declaration that it's for a 'indicator_chart_window' or a 'indicator_separate_window.' Can a single indicator be written that can be used simultaneously on multiple windows? For example, one indicator that can display a histogram on a separate...
[Deleted]
Hello everyone, First off I have to tell you all I am not a programmer but I have put in every effort to figure this out before asking for your help. Basically I came across a cool MT4 indicator and started editing it. After a lot of trial and error I have actually made good progress and learned a...
[Deleted]
This is my first EA which I'm trying to backtest, and I run into weird problem. if ( (Close[2] < Open[2]) && (Close[1] > Open[1]) && (Close[1] > Open[2]) ) { TakeProfit = ( High[1] - Low[1] ) * 1 ; StopLoss = (...
[Deleted]
Hi I've got two questions about MetaTrader4, I'm very grateful if anyone can help: 1. Is MetaTrader 4 capable of generating signals from 2 unique data points (data from Oanda) at the same time? I need to generate entry and exit dependant on market 1 and market 2 both trading above or below their
[Deleted]
Hello I am trying to build an EA which will add position if market goes against itself. TP is always 3 pips (30 pippettes) from average price. and new positions will execute if price goes 30 pips against last open order price. This will act in both buy and sell positions. My EA opens positions as i...
Hi, Is there someone here who can slightly modify WPR indicator code for me? The way I understand WPR at present is it writes the line on close of each bar. What I would like is for WPR to write the line once bar is 10 pips long (high-low=>10 pips), then wait for new bar before writing again. I use...
[Deleted]
Hello. Does any one know how to write a script for the indicator Stochastic Momentum Index? It is much better then Stochastic Oscillator. But I don´t know how to write a script for it and a scrpt for using this indicator in an EA. Here is the description how to calculate the SMI. Thefollowing...
Hi, I’m a real newbie to this game and this site has been recommended to me as a great learning tool. So after searching the Internet for an answer to this question I thought I would try here. I am a programmer by profession but I have had no experience with MetaTrader and EA’s which puts me on a...
Hi people, I'm creating an EA which uses an array to store different price leves to be considered for each opened order. I'm worry about what happens when external events affect the EA execution, for example: interruptions in the internet connection, or even worst a complete reset of the computer
Hellow, I am completely new here. First posting. Can someone perhaps explain where I might find the source code for various indicators on MetaTrader 4. I am particularly interested in the Money Flow Index. Perhaps you could give me a link to the code. Thanks, Brian
Why is MetaTrader so badly programmed? Isnt there any good programmer who can make it better ? Why are there no rangebars ? Why isnt it much more users friendly ? Why arent there good buy and sell scripts i can go on for 5 hours !! very bad programmers at MetaTrader very very sad it was good...
[Deleted]
See image for a better explanation. I only want to display 1 value on the RSI and 3 on the MACD I know why they are there but I want to hide them just because it irritates me. I needed multiple buffer for the colors, etc... Is it possible to reuse a buffer just for color? int init() {...
Is there anyway to predetermine the number of times start will run using the strategy tester on a set period of timesuch as 4/11/2012 to 4/12/2012. If the period is M1 how many times will start be executed. If the periodis M15 how would I predetermine the number of times start() will run.
[Deleted]
Hi all, If anyone could please guide me how to change time in my Mt4 Demo account according to my country indices time. I would be very thankful for the same if any body can help me change the time according to my settings Thanks
[Deleted]
Hi all, I've had a couple of occurrences recently where the following statement triggers when it shouldn't: if(AccountFreeMarginCheck(Symbol(),OP_SELL,dLots) <= 0) { blah... Notes: dLots is a double which is set to 0.1 on this occasion. There is plenty of free margin. If I create a...
Hi guys, Im running my EA in tester and OrdersHistoryTotal(), OrderClosePrice() and OrderTakeProfit() are all showing zeros even after orders are Open and Closed.Here is the code. Thanks for your help. double PriceTP; int Total_History = OrdersHistoryTotal(); for (int pos = 0; pos >=...
ObjectCreate( "andrew1", 19,0,gt1t,gp1,gt2t,gp2,gt3t,gp3 ) ; how to draw a parrallel pitchfork in mql4 thanks in advance t
Hi, I have an indicator which draw Up & Down arrow in the main chart window to provide buy & sell signal.How can i use this indicator in EA using iCustome() function? I mean what is code in "int var=iCustome(???????)? plz help. thanks in advance. Here is the indicator code: #property...
[Deleted]
I sold one of my EAs to a client. He is getting false signals that I am not getting, and I am getting the correct signals. We are both using the same exact EA and the same exact broker . The EA is attached to the same exact pairs. What could be the cause of this?
Solution to some email related issues recently posted on the forum (SMTP account problems, removing "Expert Adviser", HTML formatted emails)
(11 1 2)
Following some recent email related posts here is a method I found that enables: Sending emails without a SMTP account.Removing "Expert Adviser" from the 'From' field.Sending HTML formatted emails.The method uses a freeware SMTP relay client I have been using for a few months: mini-Relay v0.9.77d...
I am backtesting the following script. The return value for orderprofit is 0 and it should not be. What am I doing wrong. int ticket= OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-.0011,Ask+.0014); // Scenario 1 OrderSelect(ticket, SELECT_BY_TICKET);...
Hi, I am new to mql programming. I have an custom indicator which give buy & sell signal by putting arrow in chart window. It doesn't pass any return value for EA. So i can't use iCustome() function from EA. How can i get the signal from EA?In the code what i have to add after "CrossUp[i] = Low[i] -...
the syntax of it is ObjectCreate( "andrew1", 19,0, gt1t,gp1,gt2t ,gp2 ,gt3t ,gp3 ) ; the main problem is that gt1t gt2t gt3t need to be converted from double format to datetime format as the function accept it i have for example gt1t=17 in double format,,, it means 17 bars before the...
Hello, I have a *really* stupid question I am really sorry to bother you with: My metatrader4 templates always forget the colors I had set for certain indicator buffers. Why? The code in those indicators are as follows. Is there a way to set the code to make the template actually remember that as a...
I have seen and read a lot of commets about the spread (durig weekends, bougus server, ..) of MT4. But what I have not found is an answer to to that question: If I start a backtest - e.g. ~10'000 tries: is the spread taken once at the beginning this backtest, so it's the same for all the ~10'000...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.