Download MetaTrader 5

MQL4 and MetaTrader 4 - page 657

To post a new topic, please log in or register
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...
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
  Bad programmers (15   1 2)
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...
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.
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
I need to run a script during the last run of an ea in the strategy tester. The program should loop through start and during the last run of the start program the script should be executed.If I could predetermine the number of times the start program will run I could create a counter and execute the...
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...
I think I know the answer, I though I would check with those that are more knowledgeable than me just in case someone has a good idea. I'm coding for an Indicator, I want to do something when a Trend Line has been moved by the user, ideally I want to only do the something when the TL has been...
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...
Hi, I am using the SuperTrend indicator as part of an EA, but the indicator is very slow and is making the testing incredibly slow. Can anyone help with how to speed it up? Cheers Paul
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?
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...
hello,,,could any one help me please getting points z1 and z2 in mql4 given :point 1 and point2 both in price and time z1 is the intersection between the horizontal line from point 2 and vertical line from point 1 i need it in price and time also z2 is at the line passing from point 1 and point 2 .....
Hello there. My EA sometimes does not open or close an order due to a disconnect or other issues. I am using a VPS and there are no issues with other brokers I am using for tests. I want to make my EA open or close trades more reliably. Can anyone please recommend a sample of a reliable order...
Hello, I have identified a problem with my EA, when i change symbol on the same chart, the EA will revert back to the original symbol and open a trade with the wrong symbol. is this a common problem or is it possible to fix in the EA, so it selects latest symbol instead of defaulting to original ?...
Hi, Im trying to write an ea and im having trouble opening orders, i also have this ea in multiple charts windows. Currently it only opens one order at a time. What i want to happen is that the ea will only open 1 order per symbol .       {                 //Print("openbuy true");...
Hello! I want to ask how can I set the TP less than 5 pips. 5pips are permitted by my broker! Do I need a script or a .dll???? thank you