MQL4 and MetaTrader 4 - page 101

To post a new topic, please log in or register
Hey guys so last year I developed an EA to automatically take trades for me. My strategy works very well as long as you know how to read price trends. Anyways as you can tell my code is quite basic and I only knew enough to code this EA since my strategy is real easy to understand. So now I would...
  Why Does This Code Work? (12   1 2)
'New_Experts' obtains its value from 'Quantity', which obtains its value from 'Experts'... So how can 'New_Experts' and 'Experts' ever have a different value, therefore allowing the condition 'if (Experts!=New_Experts)' to return true?...
Hi everyone, my VPS was working fine. And lately it turns off by itself or stay pending. I start it and turn green. And then few minutes after it goes off. Did anyone already got this issue ? And know where the problem can be ? Thank you for your help !
Hello all third time I post here and need urgent help. It is possible to add 2 datetime if I use of int Year,Month,Day,Hour,Min,Sec. examples of 2 datetime first has setup the all extern int to 2018 for year, 05 for month, 15 for days, 02 for hours 22 for min and 0 for sec and I want to know if I...
Hi, I am trying to code a user defined function in which I would like to calculate the required lot size of the last martingale order in a cycle to achieve breakeven on certain price , upon reversal. For example, Buy orders 0, 1,2, and 3 were already opened while the price going down. Now, I want to...
  Firebird EA (706   1 2 3 4 5 ... 70 71)
Firebird v0.65 EA. M30 timeframe. 4 main pairs.
Hi guys, I have an indicator that exports historical price data to csv files. I'm not much of a coder and am having trouble with this. What I'd really, really appreciate it would be if someone would be able to help where and how to put a loop in the indicator, details are as follows: 1. The...
Is using object pointers when creating a graphical panel(using CDialog.mqh), slows down the platform?
I came across this solution while searching for trendline strategies.  https://www.iexpertadvisor.com/metatrader-mql-course-module-13-using-a-trendline-in-an-expert-advisor/ But I am having a slight issue with the code and I do not know why the problem exist. The logic of the code seems correct. I...
  DLL and mql4 (3)
Hi all I have created a DLL that reads the data in a text file on the server and everything works correctly. Now I want to split the URL in the DLL and pass part of the path as an input parameter in my mql code but it does not work. my DLL is: extern "C"{        __declspec(dllexport) int main(std:...
Hi, I need a code that can do the following:Resistance_1 = High [x]1.- Yes High [x] <Close [1] {New_resistance = High [1]}2.- If High [x]> Close [1] {the next candle continues until it breaks the resistance}What I'm looking for is for the candles to continue until the break, respecting the previous...
  Find Last Red Candle (18   1 2)
Hi, Any one can help me with this situation as i'm new to mql4 programing. I would line to find the last red candle as it is showing in the attached photo. I know only one way to do that. But the problem is (What if the Red candle it is not in fifth bar back??) for Ex: if it in 4 or 3 or even in 7?...
Hello I'm mql4 beginner. Now I'm studying about indicator. But I have an error while learning to watch a movie. Error comment is  " 'Temp2' is not expert and cannot be executed ". How can i fix it? +) movie link is https://www.youtube.com/watch?v=1C52a0B2sVE and I saw until 17:40 +) Code #property...
Hi. I'm beginner and sorry for the stupid question. I see "[10,10,10]" for the first time and can't infer that. When use it? I  saw mql4 manual and attached it bottom Thanks in advance!
Hey guys, I have written a alert indicator. I found out that, the indicator send out alert before the candle closed. Kindly let me know which part of my code need to be amended. Thanks! #property indicator_chart_window#property indicator_buffers 2#property indicator_color1 clrGreen...
The function iCCI https://docs.mql4.com/indicators/icci uses ENUM_APPLIED_PRICE. Which of the this paramter is the one the default CCI indicator uses? so that I can duplicate the same value in my code using the iCCI? the values are here https://docs.mql4...
Hi Everybody, I am trying to install kaufman EA to my MT4 but i couldn't, it says "Tester: Cannot load expert..".. What is the erroe? are you able to use this EA in your MT4? KK
I wanted to convert ExpAverage in thinkorswim to mql4 function. I cannot seem to find any argument to iMA function which takes source. any idea? I want to convert following small code to Mql4 def ap = hlc3; def esa = ExpAverage(ap, 10); def d = ExpAverage(AbsValue(ap - esa), 10); def ci = (ap - esa)...
After getting the indicator name to feed in the code below so that I can get the value, I am getting a compile time error. Any idea how to get the value of the indicator "RSI" printed out? Thanks       Print("indicator short name is: " + ChartIndicatorName(0,1,0));   // reported...
How to print last version MQL4 book? Thanks
  MQL4 Workshop (18   1 2)
Hello there, I am new to this forum and I am wondering if any of you would help me make it possible for this topic to become free for all, not profitable, collaborative, and educational. The thing is I got hooked with the automated trading around a year ago, and yes I bought some of them and ended...
I'm developing some tools that requires by default to have a 0 value so the trader can customize them but I'd like to know if there's a way to set on a double value a default message like "Input here the TP value" or something like that?
  Kaufman AMA break out EA (77   1 2 3 4 5 ... 7 8)
First a description of reasons for making this EA (apart from the obvious ones ): _________________________________ Due to coders laziness I guess, or due to ignoring the possible errors in EA execution, EAs with proper code execution error management, order exceptions execution and error...
Hi. I am trying to understand the ordersend function. According to the MQL4 reference documentation, it takes volume as a double e.g. OrderSend(Symbol(),OP_BUY,1.5,price,3,stoploss,takeprofit,"My order",16384,0,clrGreen); where 1.5 is the volume to buy. Some brokers use 1000,10000,100000 size lots....
Hello , 2 indicators are initialized in main chart  by these set of instruction. double ExtMapBuffer1[];                         double ExtMapBuffer2[];                         int init(){      SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 1);    SetIndexArrow(0, 233);    SetIndexBuffer(0,...
What is the actual reason of "indicator is too slow"? I noticed that adding an artificial delay (10-20 sec) in OnCalculate does not cause the appearance of that "too slow" message, therefore, the reason is not in the long calculation of an indicator.
for(cnt=0;cnt<total;cnt++) compare to (cnt=0;cnt<=total;cnt++)? As I was trying to use CloseAll(), I found that the typical one (first one) providedby CodersGuru didnot manage to close all and one open trade was left unclose. in addition; any different for: OrderSelect(0, SELECT_BY_POS); vs...
Hi A mql4 code changes the chart symbol using the "ChartSetSymbolPeriod" method. And since the chart has an indicator, it takes a second or two to render the indicator onto the sub window. Is there a call back which gets triggered once the indicator finished rendering so that I can do other stuff?...
HI can some one fix this EA its not opening any orders. EA MQL4 Scrip is attached bellow please help me with the code strategies i copied from indicator i want to send buy orders when new signal comes.  I have a equation too in mql4 can i do this? int start()  for(int cnt=0; cnt<OrdersTotal();...
I've got an EA that I am trading on 4 pair. I know by using OrderTotal I can restrict the number of orders opened at a give time, so I have it setup so only 1 order can be opened at a time. How can I set it up so that 1 order can be opened PER PAIR?