MQL4 and MetaTrader 4 - page 1066

1. Why is it necessary for an EA to deinitialize and reinitialize if I change the timescale of a chart? I see no reason for this, and it doesn't help me. 2. If it is necessary, can I supress the messages that are shown in the Experts tab regarding initialization and deinitialization? They make it...
Hello, I am having a little trouble reading ChandelierExit.mq4 values. ChandelierExit is a custom indicator that calculates and draws stoploss based on the volatilty of the market. It's code it's the following. I want to read the short and long stops to update the SL of my positions. I know that...
Good afternoon, I have a simple problem and maybe you can help me to sort it out. I want to use full stochastics into my Ea, which displays values from 0 to 100. Like this: However, the EA receives floating numbers that are not in the 0 - 100 range. How can I make iStochastic() to behave as in...
[Deleted]
  please help  (2)
I've installed MteTrader 4 & 5 but do not know how to use them. e.g. set limit loss/profit. I'm in demo environment but can't set to trade i.e. placed a new order but keeps getting a sound and no trades executed. Can someone please help me or point me to somewhere where I can get help. Thanks in...
[Deleted]
Hi, I've written an indicator to test out the trigger for my EA . But something is wrong with it as it seems that my indicator buffer are only stuck at 1 level. Hope some kind souls could help to point out the problem in this Indicator....
[Deleted]
  Please Help Me~~  (1)
Hi. I have an EA. It has gone well on IRON and PRO brokers.(No ECN/STP type) However it doesn't work on any other broker such as PEPERSTONE, ADMIRAL (ECN STP type). I don't know why it doesn't work. Please let me know and solve my problem. Thank you. I attach my EA.
Hi, I have declared a lot of variables like int Varname1 = 5; int Varname2 = 10; int Varname3 = ... Now I tried to convert my code with a for-loop automatically. I tried this, but it doesn't work: for(z=1; z<5;z++){ var = pips2dbl * StrToDouble(StringConcatenate("Varname",DoubleToStr(z,0))); ...} If...
[Deleted]
I am trying to write a script that compares the rsi of the eur/usd to the aud/jpy. Here is what I have so far: iRSI( NULL ,PERIOD_M15,14,PRICE_CLOSE,0); I am not sure what goes in for NULL . I couldnt find if it is possible to do a comparison like this in the reference. Any ideas would be great
  closing script?  (1)
Hey all, Not new to trading but DONT know programming. Looking for script/ea that will close open position or remaining open lots if or when any following bar CLOSES below the low of the opening bar and vice verse of short trades. (any following bar closes above high of opening bar.) Is this...
[Deleted]
Hi, I'd like to draw a rectangle around a label object. How do I do this? A label object is defined by XY-distance, while therectangle is defined by price/time. In other words: How do I map XY-distance to price/time? Thanx. ForexFan
[Deleted]
Hi. I would like to know if the following could be done without affecting the copyrigth of Metaquotes, that is, legally: One hypothetic client of mine would send to me his "symbols.raw" binary file from his MT4 client terminal. I would modify this file (to allow him to back-testing (via Strategy...
Hello, I am a beginner MT4 coder who needs some help. Luckily, it is not going to take too long to explain my problem. I am trying to create a Fractal EA Scalper that takes 5 pips from every fractal that displays itself on the screen. But I cannot get the trading logic to work as I would like. Here
New article Speed Up Calculations with the MQL5 Cloud Network is published at mql5.com: How many cores do you have on your home computer? How many computers can you use to optimize a trading strategy? We show here how to use the MQL5 Cloud Network to accelerate calculations by receiving the...
[Deleted]
Hi everyone, Maybe you can figure what's wrong with the following program. The logic of the code is to create a range of 10 pips where the low is always going to be the lowest price since the EA started and that the price did not touch the upper band of the range. Every time, the upper band is...
[Deleted]
Hi together, I'd like to know if it's possible to close an order automatically after a period and/or SL is reached... For example: I've opened a trade at 1p.m. and want to let this order closed when the quote reached it's StoppLoss or a period of 2 hours elapsed. Here's the actual code: // Buy
How can i test my correlations expert advisor?, the strategy tester can't handle it
Hello, This is my first serious post and I am developing a scalper. I have programming background and this is my first EA ever. I have some good results but I need some help. I' show a backtesting (2001-2012) to hook you guys up, and then proceed to tell you how it works -not in extreme detail- and...
[Deleted]
Hi All, I am busy learning MQL4 and have been trying to create a simple EA that places a Sell order when the price gets to the resistance line and places a Buy order when the price gets to the support line. The EA gets the values for the support and resistance lines from a custom indicator. The...
I have a piece of Martingale code in my EA. When I run a back test on my EA with the MartingaleFunc == false there is no problem with the back test. It runs. But as soon as I set the MartingaleFunc == true the back test refuses to start. This tells me there must be something wrong with the code for...
New article Create Your Own Graphical Panels in MQL5 is published at mql5.com: The MQL5 program usability is determined by both its rich functionality and an elaborate graphical user interface. Visual perception is sometimes more important than fast and stable operation. Here is a step-by-step guide...
[Deleted]
I wish to have an array populated with data for individual ticks! i.e. for each and every tick: Time, Bid/Ask price. This is easy to do if you create an Array, and just start populating it with the Ticks incoming and you create your own "tick database". The problem with that is you have no access to...
Attached test results from my latest EA. Looks good, and with a time filter it looks dramatically better. But... What I've done is to filter out all non-profitable hours for each of the 5 days... done this over the whole 6-year period, meaning there is a set of trading hours each day of the week...
here is what i want, a window that i can use my sonor alerts when i want to, i ve been told that this needs stanrd windows mt4 . whatever, what i want now is the name of the software to make the windows then i ll post it as a job does anybody know the name of the software i have to use to create a...
HELLO ALL TRADERS, MY NAME IS ALESSANDRO FROM ITALY,AM LOOKING FOR A RELATIONSHIP WITH INDICATOR HISTORICAL VOLATILITY 100 / 6 100/10, SUCH AN INDICATOR IS SHOWN TO BE IN HIS CONNORS LIBRO.The HVR is basically a ratio or percentage of a Mathematical shorts to long for the average historical...
[Deleted]
Hello everyone, How do you figure out the min and max of the ATR indicator? Basically, my plan is to flag if the current atr is closing at the min or max. I can get the atr value by calling the iATR function but I can't figure out how to get the min and max for a certain periods. I try to loop...
In the following code, all the symbols appear on the chart as green/buy. Is there any reason why it doesn't check the 2nd part of the else if statement? if ( (Bid > iMA(symbol[y],PERIOD_D1, 10 , 0 ,MODE_EMA, 0 , 0 )) && (Bid > iMA(symbol[y],PERIOD_D1, 20 , 0 ,MODE_EMA, 0 , 0
[Deleted]
I relized thet I have a serious problem while testing a strategy: using the same EA I obtain very different results using exactly the same parameters on the tester. The script I'm going to show you is written for counting bars when they come out, but MetaTrader jumps some ones!! example: Test1
[Deleted]
HI, iv been looking through the documentation and i may have missed the section, i want to manually/visually add support, resistance & trend lines and the EA to pick up on it. what is the best approach? Thanks
Tasks like: On Monday, there is a 10% chance of rain. On Tuesday, there is a 10% chance of rain. On Wednesday, there is a 10% chance of rain. What is the probability that it will rain on one of these three days? I'm used to solving by the "backwards method". First, we calculate the probability that
Hello,Can anyone create an EA that writes rates to a file for a certain time period, only remembering or recoeding the highest and lowest points during a specified time period. Then once that specified time period is up, it places Stop entry order x amount of pips away from the highest and lowest...