MQL4 and MetaTrader 4 - page 907

[Deleted]
Hello to Everyone! I would like to draw a trendline with ObjectCreate("trendline",OBJ_TREND,0,time1,price1,time2,price2,0,0); I have the time1 in that format: 2011.10.03 18:12 and time2 in the same format: 2011.10.03 20:12 Price1 and price2 are in a normal double format. Does someone know a way...
[Deleted]
Hello everybody, I'm trading on correlation between the pairs usdchf/eurusd and kindly wanted to ask for some help from you coders. What I need is a script/ea that allows me to close specific positions on these two pairs depending on price levels on the crosspair (eurchf). Example: I've got four
[Deleted]
This is my first post on the forum, Have been coming here and reading off and on for some time. Its a great place to learn. One of the best I've found for the "mql" language! Thanks to all that make it possible and those who Moderate it as well!! The problem is most likely easily fixed, I've tried...
Hello, some broker set up stop loss or take profit with a level of 300 points or more, it is possible to modify this set up ? thanks for your help
[Deleted]
Hi, I am new to MT4 and struggling to set up envelope lines 1% above and below the 60 day moving average. Can anyone help me with a solution please
[Deleted]
Hi Fellow Traders -Programmers! I appreciate yourhelp on the issue: I have many profiles,each for different analysis purposes; each profile have many charts windows inside. The issue is it's time consuming to change different market,like from eurusd to usdjpy for example, into the same profile; each...
Considering the amount of instruments available at most brokers it would be nice if MT4/5 supported either 1. a way to change the instrument and/or period (settable which of the two should be changed) on all currently open charts 2. a way to 'link' charts such that if you change the...
New article The Basics of Object-Oriented Programming is published at mql5.com: You don't need to know what are polymorphism, encapsulation, etc. all about in to use object-oriented programming (OOP)... you may simply use these features. This article covers the basics of OOP with hands-on examples....
FX is not stationary, it is non-periodic. So it does not make sense to use a constant look-back window on any indicator: they all need to be adaptive to the market. I would suggest to make an overview of all possible ways that the length of the window can be adapted to the cycle length. I will
Hello, My company is working at an integration between Java and MQL4. The advantages of the approach is the usage of artificial intelligence, databases, web services, high performance computing gateway, or statistical artifacts already available in Java. We have already the capability to call static...
[Deleted]
Hello, We are having an issue defining our Stoploss and Takeprofit levels. We broke down the MACDsample EA supplied with MetaTrader 4 to a simple Macd Cross EA. We can set the takeprofit and stoploss values but the EA backtest results are inconsistent with what we have set. We are not sure if we are...
[Deleted]
I have a workable EA based on RSI. I seek for help to improve this EA with an automated lot size (increase or decreases automatically depending on current margin or equity) Can someone help me with this?
[Deleted]
Good morning, as always, the first steps are the most difficult ones, so I appreciate help. I have tried to adapt the codes of existing indicators, but I have difficulties. So I prefer to specify what I would like to do: 1. 2SMASlope_Indicator: Inputs: Fast = length of SMA1 (= 1st Simple Moving
hi i have been trying to adapt this code to my ea so I have got it to find a trend line drawn by me on the chart no it not my code just my adaption of the code the function works and produces the desired result however i can figure out how to get the result out of the function that is i cant...
Hello! I've looked in the forum but cannot find anything. Before I go and code it myself, I thought I would ask - is there an equidistant channel indicator? Something I can access from within an EA? Thanks very much!
Hi, I have created my first basic indicator which was working fine until i tried adding arrows to it. The indicator is a basic envelope indicator which sounds an audio alert and prints a message when the price hits the top or bottom 15% envelope of the 5EMA (minus a 20 point buffer - to give me a...
[Deleted]
I noticed of recent that something is wrong with my MT4 platforms(about 4 of them) because i could not open the properties window, the Option tab under Tools, cannot apply indicators or scripts and the already applied indicators could not have their parameters changed because the window would not...
[Deleted]
I often find that I want to go back to review a specific set of trades. Is there a technique that will allow you to go directly to a specific date/time on a chart? The manual scrolling is very tedious, and when you change something the chart flips back to the current time. Is it possible to...
  My MT4 closes  (2)
Hi there, I just installed the new version of MT4 build 409 on my VPS (my broker is FXPro), and all the EA's, and i don't now why but the MT4 is always closing. I already uninstalled and installed again and it seams that the problem maintains. This is only happening since i've updated. I also have...
Hi, I have a problem with my program idea. I am able to draw my trading idea like a state machine with different states and different steps at each state. But I can't program it in the right way :-( In a few points in my program I have to ensure that a certain step would be done and nothing else but...
[Deleted]
Hi, is it possible to program mq4 to do some action at the moment of execution of a waiting order? For example, delete all pending orders or write info into an external file.OrdersTotal doesn't distinguish pending orders.
[Deleted]
Lets start by showing you the code for placing the order, I've added some notes to avoid confusion: int iSuccess; double iStopLossShort = (dCurrentPriceBid)+(35*Point*10); // I set the current Ask and Bid price to a variable in the Start function so I work with the same value for all...
Hi, does anybody know, how I can change the dafeult setting of chart that are started by the tester (isVisualMode()). I would likt to start the new chart without the grid (uncheck "show grid") and with some other colors more darken one like DarkSlateGray. That way the comments of the EA being...
[Deleted]
I am trying to write data to excel and no errors arise when I compile but If I have a loop I my function is supposed to open the file to write initialized as such string filename=StringConcatenate("Quantitative_Info",Symbol(),"_",timeperiod,".csv");    int handle=FileOpen(filename...
[Deleted]
Hi ! I cant speak english very well and i need your help. I have code like this; ..... void ExportDeals() { int dg; string st=""; dg=MarketInfo(OrderSymbol(), MODE_DIGITS); if (dg==0) if (StringFind(OrderSymbol(), "JPY")<0) dg=4; else dg=2; st=st+DoubleToStr(OrderTicket(), 0)+";";...
[Deleted]
Hi I'm new to the MQL4 and I would like to know how can I add a trade position or do some calculations at a new candle opening ? Thanks for any help
  ZigZag breakout  (16   1 2)
Hi all, I'm quitte new in MQL4. But i'm looking for a simple ZigZag breakout EA. Entry long when the previous zigzag peak is broken out and the previous low must be higher than the low before the previous low, and simultaneouly a CCI value of over 100 is reveived. Entry short when the previous...
[Deleted]
  thinking mistake  (2)
Good day, double highestP = High[ iHighest ( NULL , 0 ,MODE_HIGH, 48 , 1 )]; int x = iHighest ( NULL , 0 ,MODE_HIGH, 48 , 1 ); double xrespMAh = iMA ( NULL , 0 , 20 , 0 , 0 , 2 ,x); bool highcheck; if (highestP > xrespMAh) highcheck = True; else highcheck = False; I have thinking mistake: I
  Stochastic Oscillator value  (16   1 2)
Hi I plotted the Stochastic Oscillator from the Indicators folder shipped with MetaTrader version 4 build 210 and wantedto use its values in a my code. so I found double iStochastic(string symbol, int timeframe, int %Kperiod, int %Dperiod, intslowing, int method, int price_field, int mode, int...