Download MetaTrader 5

MQL4 and MetaTrader 4 - page 874

To post a new topic, please log in or register
  help please (2)
How can i get accurate splippage for my EA? The problem it has is that it places one order sometimes and it two sometimes and i want it to be placing buy and sell at the same time so i think the problem is the splippage. But if am wrong let me know and if there is a way i can be generating splippage...
I am getting order close error 4051 invalid ticket for order close function. Below is the code that I am using --- can anyone please provide a solution? Thx #include <stdlib.mqh> // External Variables extern double LotSize = 0.01; extern double StopLoss = 500; extern double TakeProfit = 1000; extern...
  coding issue (2)
how do i write in code : if (order is closed) {open this order} else {open this order} else {this 3rd order}? without numbering the orders, i just need it to be simple so that if a certain pending order has been placed it doesnt get placed again until it reaches a tp or a sl. thanks
Hi, I am writing a new EA which restricts trading to spans of currency-price which I refer to as "frames." These frames have upper limits, lower limits, a datatime value of when the frame was opened, and a datetime value of when the frame was closed (0 if it is still open). ex:...
Hello, I have tried to create an indicator that sends an e-mail when last complete bar has closed over or aunder the 48 moving average. Although it works, I receive mails at every tick. How do we design the code so that you get an e-mail only on the first tick of the new bar that has satisfied the...
//+------------------------------------------------------------------+//|                                           testprint_function.mq4 |//|                       Copyright ?2010, MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Hello, I would be grateful if someone could add the iCustom() function to this EA so I no longer get the 'SetIndexBuffer function must be called from custom indicator only.' error message when running on strategy tester. the indicator is called Launcher Insight Indicator #property...
HI, I want to use mt4 data feeds from different brokers, for example fxcm data feed and forex4u data feed, just to develop arbitrate ea, Any help greatly appreciated. Thank you.
I've got a little snippet of code that works fine on my home PC at multiple brokers but fails on my forex.com VPS. External variables are defined as follows: extern int GMT_StartHH = 11; // GMT Hour to start trading extern int GMT_StartMM = 00; // GMT Minute to start trading extern int GMT_EndHH =...
Simple question: How to make Tab character (\t or \x09) work in a ObjectSetText(), such as in ObjectSetText (oName,"Message 1" + "\t" + "Message 2",12,"Arial Narrow Bold",Red); it doesn't tab, when displayed on the screen.
Hi all, is there a function to get Total Open Orders for one Symbol only? As far as I know TotalsOrder() will return all Open Orders for all symbols. Thanks in advance pob
  order repeat? (13   1 2)
hi, im using the following command to place an order at a preset price: OrderSend(Symbol(),OP_SELL,Lots,91.000,1,Ask+StopLoss*Point,Ask-TakeProfit*Point,"sell",0,0,CLR_NONE); RefreshRates(); or...
I have a very simple formula that is returning strange results. double var1 = 1.27943; double var2 = .0054 double var3 = var1 -(.5*var2); The result is that var3 is set to -2.05777. I don't understand how that number is being calculated. Am I missing something?
I have one EA that places two orders at the same time ( buy and sell ) but some it will place only one order but i dont know what is causing it. Please kindly help me for the cause.
Hello, I need rewriting MT4-FSB Expert from MQL4 to MQL5. The expert connects Forex Strategy Trader and MT for data feed and real execution. The current MQL4 code is attached. Please take a look at the code or try the program first. If it necessary, the dll code will be provided also. Please, send...
how do u overlay indicators in mql 4 - when i try insert , a new indicator windowis opened. thanks
Still taking my time trying to learn as much as I can as I move along. Making a really simple indicator that should print the open of the current bar each time there is a new bar. It works correctly by checking each of the last 10 bars down to 0 but then at each tick it checks both bars 1 and 0...
heres what i have so far...im confused however how this can generate revenue. //+------------------------------------------------------------------+//| expert initialization function |//+------------------------------------------------------------------+int init()...
Hi i'm looking for a so to say add-on for mt4, that draw vertical lines separating trading days.. this way its easier for me to spot high and low's of each day/session. tried searching but couldn't find. appreciate the help thanks.. regards, mank
Dear all, I'm a new member here and i'm new too in MQL Programming, but i have some knowledges about programming in high school. Here, i want to make an EA that is using breakout as the basic. So, this EA will calculate the range of high and low from 14:00 to 16.15 server time plus 6 spreads both...
Hi, I am searching for a function of getting a pointed bar's index. Below is the code of calculating last 4 candles height in pips. I would like to know how to program the same thing only from a certain point, for example (as attached in the image) from the red line in the screen. Thanks for any...
int start()  {  double lots=NormalizeDouble(MathAbs((AccountEquity()/10000)),2),lot;  int hour=TimeHour(TimeCurrent()),minute=TimeMinute(TimeCurrent());   if (hour==7 && minute==5)  {  double high=High[1],low=Low[1];  }  if ((Bid>=high+150*Point && high!=0) && OrdersTotal()==0)  {  int...
Hi,guys. i'd like to know how to get 10mins chart in MT4? Why MT5 contains 10mins chart,but MT4 doesn't have?
Hi everyone, I need help to build up my strategy. I used that Idea with manual trading andit`s profitable. So now I need to have it automatic. I would really thankful if anyonecan code given below strategy. Basic Trading Strategy : # Check previous candle high value. Place pending buy order...
This thread is for the links about indicators/tools for all the versions for Mandarine systems. History of the development - read this post.
I was wondering if anyone has seen the indicator used in the following youtube clip for MT4? https://www.youtube.com/watch?v=rv0-u_9FDTE watch from 2:21 -Tanks
Hello, i have a Web vServer with a Debian distribution. i can only look with Putty (shell) and with Webbrowser if i have a Aplication thats works on browser. i dont have the Desktop version! it is a vServer from a Webserver!! I want to use MetaTrader 4 with this Debian vServer. Can you help me?? I...
  Box Breakout (28   1 2 3)
Updated the indicator somewhat mainly cleaned up a lot of the leftover code garbage and changed the comments by adding some code for auto gmt but for now it just places the comments on the chart, you need TimeGMT.mqh in include folder and NonLagMA_v7.1.1 in your indicators folder.
Hello, I need help with a programming concept for a EA. This is the scenario: I have 2 entry or pending orders in a sell limit and a buy stop 2 pips above that sell limit. The sell limit has a take profit of 20pips and the buy stop has a take profit of 10pips. Let’s say the sell limit and buy stop...
When Herve Leger’s bandage dress was first launched in the 1980s, I had already given my heart to another homage to elasticity, an Azzedine Alaïa black stretchy sheath so flattering to the figure that one of my friends borrowed it whenever she wanted to seduce a man, and labelled it 'result-wear’,...
1...867868869870871872873874875876877878879880881...1249