MQL4 and MetaTrader 4 - page 190

<removed> Hello I am new to MQL4 anda trying to write the indicator above which is on tradingview, I dont have any errors but I cant plot any lines. Could you help me, what's wrong
Hello, I am trying to get my open orders to close based on the ticket number but my positions do not close in the strategy tester. I have attached my code below. Any help will be greatly appreciated. Thank you. <removed>
Hi guys,I can't find maximum deviation checkbox in my order window mt5.I upload two picture one from my mt5 and one from a tutorial video,as you can see they aren't the same.Anyone could help me
Hello, I have been trying to optimise my code so that if 2/3 orders were closed at a loss, then reverse direction of the order. I got this code from another thread and I do not understand it fully, what does the count++ function do and how does adding count == 3 mean that it counts for the last 3
Hello I have noticed that my EA is trigger is triggering too many orders at the same Bar although I've done my calculations to be judged for bar only once. (see attached EA triggers...png) This is making it so hard for me to debug/analyze each order to evaluate my EA EA algo is as simple as updating
Dear community! I need EA that opens trades with comments. For example if I run it on EUR/USD and set for example 0.2 lotsize so the robot opens for me trades with comment, based how I like BUY or SELL. Thanks in advance
Hello is there a way to change the color even the style of a buffer in OnCalculate, after it has been initialized in OnInit? especially without introducing new buffers
What is the Formula of Fibonacci Retracement? I'm planning to put Fibonacci in SubWindow. I searched fibonacci retracement formula in Google and MQL Forums but I haven't seen it yet.
Hi, why in the following code cant I get it passed validation without having to have lotsize = 1.0 Any smaller lot size and i get error 131? //+------------------------------------------------------------------+ //| Expert initialization function |
Hello, i have a strange problem and just want to post it, first, without code. I have CAppDialog derived Dialog with some CLabels, CButtons etc. All this in an indicator. When i attach this Indicator to a chart, all is fine. Switchting timeframe, all works. All Dialog elements visible. Now i save
Hi friends, Hope you are doing well. I want to tell my EA if Current drawdown<-500$, Remove the expert. But I don't know how can I calculate current drawdown or if there is any predefined variable for this. Your advice is appreciated
Hello Everybody; I have a expert which has to be code. my problem is the robot doesn't put Tp on target when opening a trade. When the price reaches the target, it closes. also not in SL. Is there anyone to help
  Lot size  (34   1 2 3 4)
I need help for my code plz I want to increase the lot size every month only For eg: This code should be calculated from the initial balance of the month If the initial balance is 1000usd in 1january 1050usd in 2 january ......... 2100usd in 31
I am very, very puzzled with results I am getting from metatrader's backtester. I am hoping someone else has had similar experiences, and may have an idea of what might be causing mine. An expert I developed achieved excellent results in backtests and across a wide range of variations in
The following test code is not work on MT4(build 610). I want use Characters of Windings with the OBJ_LABEL object on MT4(build 610). (1) compile ( build 509 ) & execute ( build 509 ) -> OK (2) compile ( build 509 ) & execute ( build 610 ) -> OK (3) compile ( build 610 ) & execute ( build 610 ) ->...
Hi, First time I try to call an indi into my EA... and I got lost o_O ! Here the indicator: RSI divergence. //+------------------------------------------------------------------+//| Custom indicator initialization function...
Hi all I would like my ea to check if daily chart (Engulfing&Harami), if it's buy/sell then i would like to do the same on the M5 Chart. Below is my code, please help if you know the problem. //+------------------------------------------------------------------+ //| Expert tick function
I have created an EA which works perfectly as it should on 4 of the 6 pairs that i trade. The two pairs that dont work are EURGBP and EURUSD: They are fine in strategy tester , but when i put the EA on a chart in live the on Bar function does not do anything. Is there a simple reason why? please
[Deleted]
Hi guys, I need help to search for the source code regarding this indicator or its updated version. I believe this is a free indicator made by someone or a group, as it is not tied to the user platform. I have traced it to another forum, but Sergey told me he has no idea of who created it. There is...
  mq4 source code  (2)
Where can I find the mq4 source code for the MT4 > Navigator > Indicators > Trend > Moving Average that includes the Apply to: "Previous Indicator's Data" and "First Indicator's Data"? Thanks
Hi team, I'm experimenting with the coding of the Donchian Channel (Defaulf setup) + Super Trend indicator (Default setup) in one indicator, but I can't find how to have them together, is even the beginning right? #property indicator_chart_window #property indicator_buffers 4 #property
Hello, I started with Forex trading this week from my iPhone app using my live account after switching from the demo account (broker: Oanda). I’ve been using MT4 all week without a problem and suddenly today (Friday) around 5-6pm, I go back in cannot see anything (balance, trades from the week and
Sometimes I got "On Update" for charts. Do you have mq4 script to update currency's all time frames? So that I can get the data and display properly on chart, thanks
Hello everyone, I am having This problem, the code seems to be written all right but if I insert the filter time from 8:00 to 20:00 I get the error 'inTimeInterval' - function not defined Where am I doing wrong? #property copyright ""#property link      ""#property version   "1.00"#property...
How to get Bid upto 6 Digits? Please help me with this. I know I can get it by DoubleToStr(Bid, 6 ); but this is in string format which cannot be used within any other formula. I want to use it in different formula. Any help will be really apreciated. Actually, I am working on get MACD values using
Hi I get OrderSent error 130 if I put a StoppLoss or Take Profit during OrderSend when I seems to have a to large value (SL > 1% ) .. ( that is an invalid stop loss ). I am use to get this if I have to tight stop loss, but is there a limitation on how fare away stop loss can be? The limit seems to
Hello I am trying to Create a bitmap label but its not working , i checked the object list on chart (CTRL+b) i can see that it created a label but the image isnt visible on chart. Here is the code : string name = "label 1" ; ObjectCreate ( 0 ,name, OBJ_BITMAP_LABEL , 0 , 0 , 0 );
I was trying to code my own EA and created some custom function, the issue that I am facing is as if the custom function that I have is not being read in the EA if the variable that I have assigned this function to is initialized with -1 although when I change that variable to zero, it works fine
My EA is operating very slow on MT4 Tester, it contains loops and nested loops, I do not know if that would slow it down that much, Can I save the data of the loops in functions in array and would that make a difference in speed of the tester? thanks
This is the code I have so far but for the sharpe ratio. int OnInit () {   if (IsTesting () || IsOptimization ()) GlobalVariableSet ("InitialBalance", AccountBalance ());   return (0);}void OnDeinit (const int reason) {   if (IsTesting () || IsOptimization ()) GlobalVariableDel...