MQL4 and MetaTrader 4 - page 171

To post a new topic, please log in or register
When I debug a MT4 program (currently a script), I after some short time are thrown out of the debugging process and have to start new (Soft-Key "Start debug"). At this point "Stop debugging", "Step into" etc. are inactivated (of course). This seems to be correlated with the frequence of market...
F2T
Hello everybody, i've got the following problem when testing ea: The result in optimization and testing without optimization are different (same parameters). I think that come from the spread not taken into consideration in optimization mode. can somebody could confirm or indicate me the origin of...
Hello Members, Looking for a simpler logic to find Lower High under a certain time limit. Please see the picture for better understanding. In this case, I can find Highest point with iHighest Easily. Highest_barindex = iHighest(NULL,0,MODE_HIGH,80,1) But how to find the Lower High point X?  Thank...
Hi  I'm getting into crypto trading and want to use my mt4 indicators. Could someone recommend a mt4 broker that has lots of crypto symbol to use? lmk that would be great. J
I am making an indicator to identify tops and bottoms of price movement and connect them just like the zigzag indicator actually there are three buffers: tops[] , bottoms[],and zigzag[] which is the combination of tops and bottoms my problem is that sometimes the same candle  qualifies to be have a...
Something strange overhere, only when i close and restart the metatrader 4 platform orders from my EA are placed, immediately.. Has it something to do with connection, or with the EA, but what? Ed
I know this has to have been answered before, but I can't find it in the forums... So on with it. How do I make my indicator update every tick? I have an indicator that draws an arrow above and below a candle that is an inside bar. The problem is that when a new candle forms, it is an inside bar,...
IndicatorCounted() - Which are the Default or Correct indicator calculation in MT4/MT5: Current data to Previous data ("Right to Left" or "Zero to Last bar")??  Someone said that if you started in current data ("0") for indicator calculation then your indicator become lagging indicator?? WTF! I...
Hello, the shortcut for commenting (blocks of) code in MetaEditor is "Ctrl + ' " (both on PC and Mac) However, the PC-shortcut for uncommenting is "Ctrl + ; ", but that doesn't work on my Mac. Does anybody know the shortcut for uncommenting (blocks of) code on Mac? Many thanks!
Hi, I'm Newbie of coding. Copy, Paste and edit is my Practice now, i facing some problem hope you guys can help me. Please help to solve the error as below. Thanks 'Verbose' - variable not defined  Utility Functions //=============================================================================...
hi, sorry for bad englih, I have one expert advisor, but backtest is very slow, in robot code have my indicator code, (in this way my robot not need indicator for use) but I thin this is not reason for slow backtest ( because I delete my indicator in robot code, so in this way for my robot use need...
[Help] Custom RSI is Missing Some Portion of Indicator Lines in 4-Hour timeframe (GBPUSD). I used SMA to get average gain/lose instead of Wilder's SMMA the default mode in MT4/MT5. If I used SMMA then everything works as expected but If I use SMA then some portion of lines is missing. I can't figure...
Hi guys!  I was looking for an automatic lot size calculator based on a horizontal line. All the stuff I have found are position size calculators, but then you have to manually enter the lot number in the Red/blue chart with the buy/sell buttons. I need something that automatically calculate the lot...
Hello, I'm learning a few programming languages, including MQL4, and I came up with a question that I didn't managed to find the answer on reference guides.When you define a new function, lets say a simple one: Double Product_3Numbers (double x, double y, double z){Result= x*y*z;Return(result);}What...
hi all, I found an helpful free Expert which closes orders after a set time, unfortunately it delete too pending orders! I would like it to close only the opened trade. Someone know how to solve this problem changing the code? thanks
Hi, I am working on a trading systems based on MAs and Sup/Res levels. The idea is if án MA and SUP/RES are very close to each other and price touches that level and bounces back to open an order. One could code that like this: if(low < MA && low < RES level && close > MA && close > RES level)...
Hello everybody, Sorry but i m newbie... I would like to create a simple EA based indicator Dtosc: BUY cross <30 SELL cross >70 I start with indicator but I can't turn it into an EA. Please, can someone kindly show me what are the first steps? This is wrong: if (SD > SK ) {...
At the very first I know that this thread is about MQL5 and I've attached MQL4 code but I think this problem is the same in MQL4 or MQL5 (maybe I'm wrong). EDIT: I've tried in MQL5 and this problem doesn't exist in MQL5 I create (by code) several objects on the chart and the first one is clearly...
Hi, Since I use Android 8 I face some serious problems with the Metatrader4 app. Every time I switch from a randon tab to the 2nd tab (graph) the app quits and I need to restart. I'm using the latest version version of the app (400.1102) and Android 8 on a new Huawei P Smart. I tried already to...
Hello guys, I'm a bit stumped here. I have developed an EA to trade Bollinger Bands. Any of you who have seen my previous topics know I'm new to coding, but I feel like I'm making progress. The issue I'm having is that when running an optimization on this EA, I get a "Zero Divide" error. This error...
Hi, When debugging EA's, you have the handy-dandy Expert tab to send Print() output to. Is there an equivalent way to easily output values when debugging indicators? Cheers and thanks.
I cannot seem to find an option on how to change the time. The candles are 2 hours in advance. When I installed MT4 I was in a different country that was 2 hours ahead. Is there an option to change the time, I wouldnt want to reinstall MT4
I planned an EA trading with grid.i explained grid like this: bool buypoints(){double m[201];for(int k=0;k<=200;k++){m[k]=NormalizeDouble(((uppervalue*1000-steppips*(k+1))/1000),Digits());//uppervalue and steppips are external values for usd/jpy.if(m[k]==Ask) return(1);}} if (buypoints()&&some...
Is it possible to apply custom indicators to mobile metatrader? Is there anyway at all to import custom indicator into MetaTrader 4 Mobile? As far as I know you can't, but I was wondering if there have been any updates or custom updates that allow custom indi? If can, How can I load custom...
I use current month+ current day+account number as a seed for MathSrand() to generate a pseudo-random magic number each day. I would want to be able to look at trade history and create a report of all trades that hit SL (for example), so I would want to get a new seed for each day in history to be...
Is there a method to capture an objects name from the cursor position? All i seen to be able to capture is the price and time I was thinking something along the lines of placing the cursor at Time1 and Price1 and then iterating through all the chart objects until I find a match for Time1 and Price1...
Hi i`m trying to build a trailing stop, and it's working fine but sometimes i get a nasty order modify error 1.I don't know if it's harmful i've read the documentation it is when the value is unchanged i guess,but the question is how to resolve it :D .Hew is my code: double TRAILSTOP;extern int...
  Excel bridge (4)
Is anyone aware of a MT4 script which would read from and write to Excel?   I know that there's one product easily found with googling.   But the reviews aren't that great.  I can get python or other code written for this but I assume someone else already has the pieces. Thanks
  Brainwashing EAs (287   1 2 3 4 5 ... 28 29)
Statement for Brainwashing 1c, H1 timeframe. 4 main pairs. This is Brainwashing EA with i_Trend filer. This i_Trend indicator is used for enter and exit as well. It was estimated during the development of this EA to catch big trade. The level of i_Trend filter should be estimated once per week but I...
Hello all! :) I need loop for this, it is strong to me... I want to find the range for the last two bars and search for 5 bars And get the result in print, please check picture for understanding. better to explain I do not know, so I believe it will be understandable from picture. I need this...