MQL4 and MetaTrader 4 - page 146

To post a new topic, please log in or register
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?
How do I convert Mq4 files into Ex4 files so I can run the Ex4 file as an EA?
I have written an indicator but it is not performing the way it should. The problem is that the indicator does not take into consideration the higher time frame (H1) when posting the BUY and SELL arrows on the lower time frame (M15) chart. If you can fix this we will have a fantastic indicator! Here...
Hello everyone, I am recently trying to predict MACD signals and i think its going well. the problem is that i want to draw it in the indicator window but haven't been successful so far. So consider i can have all the candles needed in order to calculate the iMACD(NULL,0,12,26,9,PRICE_CLOSE...
The code line below is expected to print out 1 since I have the Stochastic indicator attached. but it prints only the text "indicator short name is: " Any idea how to get the short name of the indicator? Print("indicator short name is: " + ChartIndicatorName(0,0,1));
If i resize an array which already contains data, will this erase all data or just add an extra slot? i.e., is ArrayResize({1,1,1},4) = {1,1,1,NULL}?
Hello everybody. I would like to see if you can help me with a problem i've been having. if(existeOrdenSell() == false){   orderSend(...);}if(existeOrdenBuy() == false){   orderSend(...);}bool existeOrdenSell()  {      existeSell = false;      for(int i = 0; i < OrdersTotal(); i++)      {...
Hello, I have a problem with using Global Variables. Thanks for taking a look. The requirement is fairly simple (i think), but for me it is difficult to implement. I have tried myself and hired programmers from around the globe, some have a go at doing it but don't actually code what i need or they...
Hello, I have a few questions about running EA in MT4: If I want to run an EA on many currency pairs, do I have to drag-n-drop it on every chart? Is there a simple way to run it on many pairs even if some of them do not have chart displayed on the terminal?When an EA running on multiple currency...
Hello Everybody, I'm new on MQL4 and I would like to modify the stoploss of and existing order. If my trade go up I would like to modify my stoploss, it should be greather than the open price (in case of buy), in this case OrderModify return me error code 130. Does anyone have a solution to modify...
Hi Firstly, sorry for my bad English. Im trying to make my EA. But im a newbie MT4 code, so it's hard for me. Would you please help me? These are what im trying to to: - It works on many pairs same time - If the Buy (or Sell) condition is right, it will open 1 order per 1 bar (new bar new 1 order) -...
I used TimeCurrent() to get the current server time.. But when used it in the tester, TimeCurrent() becomes the time of the chart time at which the strategy tester is running.. I want a way to get the current time to appear on the tester.. (Tried to get the local time as well, it also equals to...
Hello I hope someone can help me find an "error" in this function. The Problem: I want to calculate the high of the last 31 daily candles if Line4CandleHL == false. The number of days is returned until the point where I put the Print(). If I move it below LineH, LineL the variable LineTFBars does...