Download MetaTrader 5

MQL4 and MetaTrader 4 - page 407

To post a new topic, please log in or register
Hello all, I attached my code below which is a mixture of codes found on this forum and an adaptation of the indicator from this page http://www.earnforex.com/position-size-calculator. I'm using a 5 digits broker with 30 pips of Stoploss hence the Stoploss * pips2points. The account currency is...
hi everyone, So i am working on this code. I am looking to get the prices over a period of 24*60 minutes on a minute by minute basis. Now the iclose function takes symbol, time frame and shift as inputs. i was wondering if there is any way to make this shift a variable. something like run shift[0]...
  grail.mg4 (6)
i have one indicator but dont play . please help me. the indicator is grail.mg4
Hello, I have a data source online which I am using as an indicator to trade with. It is provided through JSON, and has a simple timestamp,value format. This JSON file sends the entire historic data, so it is a fairly large file. The problem occurs when I try to run multiple of these indicators at...
Hi, I need to use normalized ATR (Average True Range) indicator that oscialtes between 0 and 1 in my EA. I searched but could not find such a function written in MQL language. The logic must be something like below as I found from google: (ATR of last bar – min ATR in last n-bars) / (max ATR in last...
Hi, Does anyone know of a script that will evenly divide 4 charts vertically on an MT4 Platform (meaning side-by-side instead of window wise)? Now I still need to do this manually every time... Cheers, Dutchie
Hello everybody, I'm trying to add a moving average to stochastic. Graphically is quite simple, I just need to drag the MA from navigator list to the Stoch window BUT... I was looking to do that coding and I'm not so good at that. Given that when I do that dragging it, I need...
I do not speak good English, so this is a translation of google, sorry. This is my first EA, it compares the price to one hour with respect to past and it sell to future hour. I know it's not perfect, but understand that I am not a programmer. My problem is that I need to sell the position at the...
  Backtesting (8)
Hi to everybody. I tried many backtest using the Simple MACD but I have a question... Using the Tester In Expert properties there are some Inputs of Variable Value Start Step and Stop How this values change the behaviour of Expert Advisor? When I drag and drop the Expert the program don't ask this 4...
Hi, It's probably kind of a basic problem. I am coding a table with lot of objects to write different values. I don't know exactly what I changed but suddenly all objects disappeared, switching timeframes etc. didn't help. Then I found out that if I change the object name (add or delete one...
I am a US trader and I want to use a foreign broker but I am concerned about latency issues. Is there a delay in quote data, open/close times if the brokerage is in a foreign country?
Hello all, I have not optimized an EA for quite sometime and started to today with my older check list. My Optimization Results were not transferable to the back-test at all. 1. I do use a spread controller script 2. I upload fresh tick data on an offline chart 3. I use the period converter script...
New article Lite_EXPERT2.mqh: Functional Kit for Developers of Expert Advisors is published at mql4.com: In the articles of the series "Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization" 1, 2, 3, 4, 5, 6, 7, I introduced the novice EA developers with my...
I am using Meta Trader 4. My friend told me I could off "auto scroll" and "chart shift" and drag back to the date that I want. Some said, type "enter" and then type date, which will get you there. But, I realized "enter key" is not really working the way it is supposed to. Simply it doesn't go. I...
I found a simple EA which works by setting and executing a break even point. However, when I add a client-side trailing stop to the trade and both the EA and 'trailing stop' are triggered, then there seems to be a struggle between the EA and the trailing stop for setting the 'Stop Loss' price. All...
  ObjectCreate Trendline (17   1 2)
Is it possible to set a Trendline with the ObjectCreate function, that has an ending? Otherwise my Chart is full with ray's, if the program sets various Trendlines.
Hi. I write a script that connect my app and send a message informating that has a new candle. But I dont want to put this script in each chart time. I want to use this in only one and verify if for a new candle . I start with: if(DoubleToStr(Minute(),0) != lastTime_Minute){ So if diferent, we...
I made an indicator to draw rectangles with description. The problem is the description is shown inside the rectangles. But if I draw the rectangle manually, the description is shown above the rectangle. I would like to make the indicator to show description above the rectangles. See screenshot...
I have installed a few different metatrader accounts on my computer. Now I need the registry entries from them. I only found HKEY_CURRENT_USER > Software > MetaQuotes Software > MetaEditor 4 + MetaTrader 4 But I found nothing from the different installations e.g. from fxcm, alpari, ... Where are...
Dear guys.   I write a dll file using C# visual studio 2010. Then i write a EA with using my dll file. But i can't use it in my MT4. It say error as 'FX_Copy EURUSD,M30: cannot call function 'AddInteger' from dll 'FX_Copy.dll' (error 127)'. How can i use C# dll in MT4
I need to have 1 teacher I only basic programming robotforex
  mql4 question (2)
hello, i have a problem in the code . for (int Path_Counter = 0 ; ; Path_Counter ++) { FileSeek(File_Id,End_Line_Char+1,SEEK_SET); string File_Str=FileReadString(File_Id,1000000); int End_Of_Line=StringFind(File_Str,"\n",0); End_Line_Char+=End_Of_Line+1;...
i have to develop same in Dot net, not all get "Host Name" and "Port" saw many more site i didn't get no information about that. how can i get the integration for the Dot Net platform. can anybody know that 
Hopefully someone can help me out. I am not able to open the one click trading option in MT4. Top left corner triangle shows but nothing happens when clicked. ALT+T does not work. Settings in Tools/Options/Trade are set correctly. OS is windows 7 (newly installed) Broker support was not able to...
  This is a mystery to me! (19   1 2)
I am in the process of writing an EA to alert me under certain conditions. One of the conditions is based on the custom indicator CurrencySLopeStrength, but I am experiencing a strange phenomenon. I am filling three variables of every currency with the values read from the custom indicator at three...
Why aren't the following expressions synonymous? (1) Open[0] < Close[0] (2) Open[0] / Close[0] < 1 I would expect both expressions to describe green bars. The advantage of the second expression is that it could easily be modified to describe "different degrees of green": (3) Open[0] / Close[0] < 0...
I am new to MT4. I am looking for a user manual for printing into hardcopy. Can anybody direct me to it? Thank you.
I have a 101 element array (shown):   ArrayResize(Array,count);  ArraySort(Array,WHOLE_ARRAY,0,MODE_ASCEND);  int c = ArrayBsearch(Array,NormalizeDouble(1.6124,4),WHOLE_ARRAY,0,MODE_ASCEND);  Print(c): c = 78??? ArrayResize(Array,count);  ArraySort(Array,WHOLE_ARRAY,0,MODE_ASCEND);  int c =...
Hi, For my EA, how can I make it remember the stoploss value of the FIRST of a series of open positions? (This first position is opened by manual, the latter positions are by EA.) With market moves, SL of this first position and other positions have to be changed(by my EA), but I need the original...
Hi. I build a script that connect my .net app with pipe. So it send quotes from my app. I have two scripts, one like a server and other like a client. In one the app connects the mt4 for send commands and in the other the mt4 connect the app for send quotes. My problem is that I need send a string...
1...400401402403404405406407408409410411412413414...1245