MQL4 and MetaTrader 4 - page 598

New article Universal Expert Advisor: Custom Strategies and Auxiliary Trade Classes (Part 3) has been published at mql5.com: In this article, we will continue analyzing the algorithms of the CStrategy trading engine. The third part of the series contains the detailed analysis of examples of how to...
[Deleted]
I encountered with this error in pretty complex scripts. In some scripts it worked okay, but in the some scripts even the simple one like this one, it just repeats itself. Same volume is shown constantly.  //+------------------------------------------------------------------+ //|...
[Deleted]
Hi, I'm an Etoro user trying to switch to mql (i'm a senior programmer). On Etoto, say i wanted to invest 500$ on EURUSD at x10 risk, i would open the buy window, input 500, select x10 risk and that's it. How would i do the same thing with the OrderSend method? i don't see a parameter for
Hello comrades, just as the integer values for OP_BUY, OP_SELL, OP_BUYLIMIT, OP_SELLLIMIT, OP_BUYSTOP and OP_SELLSTOP are 0, 1, 2, 3 and 4, respectively, are there integer values for the traded instruments. That is, integer values for GBPUSD, EURUSD, USDJPY, etc. The idea is to run through the...
Hello,  I am new to MT4, and am wanting to write an Expert Adviser that will be able to take full tick data from multiple markets.  Is this possible?   Thanks in advance! 
[Deleted]
Hello, I'm looking for a VPS service to host my EAs. What/who do you recommend for VPS service? Thanks in advance, - Lil
I need to get the value of a particular candle, for example H1 10:00 today or the previous day. How do I get the size anytime during the day, Low, High, some specific candle?
[Deleted]
Hi all,   I wonder if someone could help me out. It's driving me crazy.    I have the following code:   // Check previous candle and previous of previous candle   double bar1=Close[1]-Open[1];   double bar2=Close[2]-Open[2];   Print("CheckEntry");   Print("bar1 "," Close[1]: ",Close[1]," - ","...
Dear All, This is my first post on this forum. So far I have managed to find solutions to my problems in other threads but not for this one. And it seems so simple. I need the class public members to be visible in an entire Expert Advisor, not only in function, within which a given class was...
[Deleted]
А
I created a file. I want the file to be created when necessary and deleted when necessary, without writing anything to the file. The idea is to use the file as a key to perform an action. If the file exists action A should be take. On the other hand, if the file does not exist action B should be...
[Deleted]
Hi, I made this EA which will take only one trade at time if the buy/sell condition satisfies. It will not take any new trade if current trade is online. Once current trade got closed it will check for buy/sell conditions again. But currently its not taking any trades. I tested the code, part by
I have an EA i made, and i want to know if it is possible to just copy and paste the code for opening a pending limit order, with magic number into a script format. This would also include parameters for money management inputs in my EA and i would like it to also incorporate the trailing stop i
hello guys,   well fairly i'm new to mql programming so i'm not sure its a bug or what! while i was testing my ea noticed there are few orders not actually created by my codes! first i thought my code logic is wrong or something to check that idea i hashed out most my code and now i got only 1...
[Deleted]
I'm currently using something like this in my code:  for (int i = 0; i < 10; i++) { // someday is date + 10 am datetime linePos = someValidDate - 60*60*24*i; // minus i-days ObjectCreate("SOMEPREFIX_" + i, OBJ_VLINE, 0, linePos, 0); } This works fine when the date is a valid date, but...
Hi, I'm new to mql4 programing I try my best to learn it. I did some modification to an alerting to have it as a buttons in the chart window. The problem that I face is when " I active the alert button and change timeframe the status of the alert button changed to false". #property...
Hi all, I have a problem with my EA, i created a trailing stop function, it works but in the tester is says "Order modify error 1" - i suppose this is for modifying the already modified order, but i need help for solving the problem - How can i make my function modify only once? Thanks in advance...
[Deleted]
I got this code that send 2 pending orders than i got an other code where u try to delete the one that did not got hit unstead my code his deleting both pending orders before they get hit here is the code: for(int i=OrdersTotal()-1; i>=0; i--)    {      if(!OrderSelect(i,SELECT_BY_POS,...
  ExpertRemove ()  (8)
Hello everybody present, did anyone here succesfully apply this function? I'm always failing with it. Added a Comment-Request to be sure the function is reached and it verifies, but no action results. I'm aware, the execution can take some time, but even after minutes the expert still stays with a...
New article Thomas DeMark's contribution to technical analysis has been published: The article details TD points and TD lines discovered by Thomas DeMark. Their practical implementation is revealed. In addition to that, a process of writing three indicators and two Expert Advisors using the concepts...
Hi Guys, Finally, I managed to create a strategy which works on all currency pairs which I tried... even if I change settings - it only adjusts risk, profits, stability, etc. Now, I would like to go live but before that I want to analyze the best portfolio - combination of parameters and which pairs...
New article Adding a control panel to an indicator or an Expert Advisor in no time has been published on mql5.com: Have you ever felt the need to add a graphical panel to your indicator or Expert Advisor for greater speed and convenience? In this article, you will find out how to implement the...
New article MetaTrader 5 features hedging position accounting system has been published at mql5.com: The MetaTrader 5 platform was originally designed for trading within the netting position accounting system. The netting system allows having only one position per financial instrument meaning that...
[Deleted]
Brand new to coding and trading. Two questions: Why doesn't this work? Would this even potentially be profitable? { double DayOpen = iOpen(NULL,PERIOD_D1,1); double TakeProfitLevel; double StopLossLevel; int TakeProfit = 10; int StopLoss = 10; TakeProfitLevel = Bid +...
Ive been trying to make the following code draw a double smoothed stochastic of the 30m chart while on the 5m chart but always get a critical error and not sure why? I have tried to put PERIOD_M30 enumeration in 2nd parameter of iHigest() and iLowest() but it doesnt work.  #property...
[Deleted]
I can't seem to distinguish between red or green bars that this indicator displays. MFIGreen = iCustom(NULL, 15, "__MFI Meter", 0, 1);MFIRed = iCustom(NULL, 15, "__MFI Meter", 1, 1); Both these just return 0 when Printing them to journal. Any idea how I can return something to distinguish between...
[Deleted]
Hi there, New to the MQL4 language and C++ in general.  I am a C# coder by nature, so as you can imagine MQL4 is being a bit difficult.  My normal MQL4 coder is out of town for a week, so I need a bit of help with something. I am trying to loop through the last [X] number of indexes for a defined...
#property strict#property indicator_chart_window#property indicator_buffers 5//---Indicator Colours#property indicator_color1 clrGreen//UpArrow#property indicator_color2 clrRed//DownArrow#property indicator_color3 clrRed//EMA50#property indicator_color4 clrBlue//EMA120//---Indicator Width#property...
[Deleted]
I fired up MT4 this morning as usual (demo account) and trades stop YESTERDAY at 11:59pm, I cannot get it to display trades TODAY?  I went through everything, even deleted mt4 from my computer (thoroughly with Revo uninstaller) and re-installed it, same thing, no trades today??