MQL4 and MetaTrader 4 - page 577

Hello, I've tried modifing ATR indicator to be shown on chart, changed the code #property indicator_separate_window to chart window, but it doesn't work. That's weird because when I do invert (modifying an indicator showing on chart to separate) it works most of the time. Any idea how I can do ?...

Hi one and all, Is it possible to convert an EA into a CSV file? I have an EA based on ATR stops and stochastic indicator for os/ob conditions. The EA is calculating the profit factor and recovery factor for each signal for x past trades.I like to convert this EA into CSV file. There are...

heyy guyz i came across a problem. the problem is that i cant use metatrader 4 indicators on metatrader 5. can any1 plz help me out n tell me how to convert them for metatrader 5? the indicators r in EX4 format...

I am using multiple charts all with the same EA attached toeach chart. I want to take my profit by closing all trades on all charts. To dothis as soon as any of the charts finds that the account equity is at a setlevel i just close all the trades. However, while closing all the trades othercharts...

Hi, I have a great filter. It has essentially zero lag, and is smoother than other known alternatives (JMA, ZLMA, ...). I have 1 problem though: that is the windowing function (the function that decides how many periods back it has to look to calculate the smoothed value in the current bar). I think...

When I specify a name prefix, it's deleting all Global Variables, not just the GVs with the prefix. There's a message in the forum back in 2006 that suggests this would be fixed, it's broken again. MT4GV_TS_Prefix = "TSv2_"+Symbol()+"_"+Period()+"_"; GlobalVariablesDeleteAll(MT4GV_TS_Prefix);

I've always wanted to have the ability to code a blackjack simulator but back then coding seemed too complex an endeavor to attempt. I settled on using blackjack simulators which worked for basic stuff but the more advanced I became, the more questions I had which my commercial software couldn't...

Hello all, I am using a hedging technique with 2 EA's - one is the primary opener/closer and one is the hedging mechanism, using Magic #'s to interact with each other.... The problem is that I cannot backtest the system in MT4 - as Tester can only run one EA at a time. Can anyone suggest other ways...

Hi all, could you give a criteria on how to use MathRand() function to open orders? Something like this: if ( MathRand() ....) BUY if ( MathRand() ...) SELL Betterif these two conditions have around 50% probability each one. For istance, if MathRand() is an equal number BUY, else SELL. Hope is...

I have an EA of a breakout strategy that no longer places trades. I stopped using it a year or so ago but changed the beginning and end times of the range which are both external variables. I have not changed the trading code since it ran successfully. Now it will trigger the Alerts in the code...

Helloagain, Once againI’ve come to ask for your help. I’ve spent several hours on this indicator andstill can’t get it to work. It counts only two bars back and … and nothing.Could any of more experienced coders (that would probably mean most of thereaders;) ) tell me what I’ve done wrong?? That...

I've just discovered MQL4, and I am reading the documentation ;-) The doco says: "Stop Loss and Take Profit orders (described below) can be attached to a market order." When I open a market execution order the 'Take Profit' field is 'greyed out'. How do I attach a Take Profit order? Do I have to...

I saw there are topics here related to my subject. but i was unable to find a way to fill gaps in the data in history center. can we get data for each 5 minute during a day from history center? if so there should be 288 records per day.

Another time that I cannot write an EA without coming to this forum for aid. ;( At least you all can see how well I have progressed! ;) Compiling the tops and bottoms over a set amount of bars is failing me :( See: Code: #property copyright "Copyright 2012, bmel_12.25.81"#property link "http...

Hello, I would like to know what to modifiy in the code of this indi so that it doesn't refresh the channel on every bar and so that the channel stay on the chart for old bars, like in the picture attached and showed on this video : https://www.youtube.com/watch?v=peYbHALhyX8 (5:35). Thanks a...

Hi everybody, I'm new here. I read much on this site and I have learn here very much. You all are great. Author of this strategy Dr. Barry Burns, he calls it 5 energies. It works on M5 timeframe with confirmation on M15. It's only working version for M5 timeframe and one market (I optimized it for...

This 3 ADX and 2 OSMA signal works better than many setups I have seen in the past. I feel it has Great potential if put in an EA form. I really want to do this soon.Problem is I am still learning the code. I am not there yet. In my first message I listed the inputs and variables of ADX and OSMA...

Hi I am new to Forex and MetaTrader and trying to figure out some basics. Assuming that have an EA which is attached to a chart of EURUSD, BUT I want to find setups in multiple pairs from that EA. But EA only runs when fresh tick for EURUSD comes. Right? Now I see this as MT’s limiting feature as...

Hello I have mt4 to mt5 conversion questions: below code will not compile due to MODE_MAIN and MODE_SIGNAL mt4 keywords, what is their equivalent in mt5? also iMACD has wrong number of parameters, can you correct? void ann_prepare_input() { int i; for(i=0;i<=AnnInputs-1;i=i+3) {...

Hello folks, I have reviewed the OrderSend and OrderModify functions and found that slippage is expressed as a int value, which is very straighforward for 2-3-4digit pairs. But what about 5-digit pairs? Must slippage be expressed in pippetes on pips when trading a 5-digit pair? Thanks in advance.

I have Spent two days and fail to find out what mistake I made, so please help me out!! Case: I want to open two sell orders, the second one will be open when the market go up 5 pip, but when I run this code (below), it only open the first one and never open the second one. Your helps gonna be...

Hello guys. Since it's plenty of code and I am still a newbie with mql4 I thought to ask you an advice based on your experience. I am spending hours to study market and MT4 and I would like to have a little satisfaction to build a robot that works a make a decent ROI at the end of the year (I am not...

Hi, I found an indicator I would like to use put it does not come in the compiled format. I use windows 7 664 and have tried every suggestion to get my metaeditor to compile but it does not. If someone would compile this and put up a link to both files I would be grateful. Thank you in advance...