MQL4 and MetaTrader 4 - page 32

To post a new topic, please log in or register
i have coded ea but need some help if Rsi >50 buy then if trend changes then order goes in loss ( ea have to wait till close this order for open an a new order as per trend ) order in loss means the Rsi is < 50 so we miss the sell zone so it is possible to make ea so to open new order till...
Hello, I have two computer systems running an Optimization for an Expert Advisor. Both are optimizing the same EA, just different currency pairs. One system is fast than the other. For example, System A is running the optimizations faster than System B. Yet, system B is a more powerful machine....
hi... is there any way to open only one order in OnTick() function without using OrdersTotal () OR ExpertRemove()?
I have thought that I could make a symbolic link of folders for MT4 to a share drive and that they could share in one folder but now as far as I know the links must be to a location that does not exist. So this would mean that there would be multiple MT4 instances of folder resources instead of just...
Hello everyone, I'm really curious to do some backtests of the famous candle patterns. I'm not very expert in programming, I wanted to ask you if you think this code is right to identify the three white soldiers .. thanks in advance for your answers void OnTick() void OnTick()  {     open1        =...
Good news is I'm trying to do this in only 1 way.  C# managed program to MQL4. Now, when the DLL code is this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; using RGiesecke.DllExport;...
I gather from the wealth of C# APIs out there that it is possible to connect to MT4 over TCP and perform various functions. The C# APIs I've found online are massively overkill for what I need - but presumably the people who made these API had some sort of reference document of how to communicate...
I want to implement the interprocess communication between the C#.net GUI and mt4? I Want to develop the GUI in C#.net for passing the data as input to the MT4? and also i want to read the data from the MT4  for displaying in C#.net GUI? How we can implement ? I am using the named Pipes for inter...
Hi everyone, I have modified the ichimoku indicator for my own trading style. There is no error but when running on charts, it return to MetaEditor immediately. I am new to this language so please help me. Thank you in advance....
Hello i would like to calculate the Profit of the oldest Sell / oldest Buy Position in the Chart.... same like that: //+------------------------------------------------------------------+double countprofitBS(int mode,int order_type)  {   double profit=0;   if(OrdersTotal()>0)...
Hi guys, I would like to show value of total, sell, buy, Equity, Balance! I tried to show AccountBalance using with AccountBalance(), but it shows default value of 10000, not my terminal showing value. Is there another fuction to show them? like AccountBalance(), AccountEquity, something like that ....
  sine wave (6)
Hello everyone. I would like to draw a sine wave with specific frequency and amplitude on the graph. I have created an indicator but it has three problems.1) When changing timeframe the frequency changes.2) The wave never exceeds the last candle.Instead of creating an indicator, perhaps it would be...
I read where I can create a script and assign it to a hotkey to change the template in MT4.  the Path for the template is : "C:\Program Files (x86)\OANDA - MetaTrader\Personal_Account\" and the template is called "!!LINEAR REGRESSION I figured this should be easy. Not so much.  The below is my...
Why would these closes fail?  The close should occur when the open and close prices of the previous candelstick enclose the moving average.  void CheckForClose()  {   double ma;//--- go trading only for first tiks of new bar   if(Volume[0]>4) return;//--- get Moving Average    ma=iMA(NULL,0...
hello  i am trying to make a code works with cross over 2 MA,  the idea is when the fast MA cross the slow one it start a buy order with volume 0.01 and wait till the other cross in the second cross if the previous order have profit it will close it and start new sell order with volume 0.01 if not...
Hi, I would like to ask if someone has already tried to accurately check if a certain trade is closed by stoploss or takeprofit. I have a function that deals with this but its not that accurate because it checks the orderhistory then checks the comment if it has "tp" or "sl" on it but the problem...
Hey everyone.  I am very new to MQL and am just stuck with playing around with a very simple EA I'm trying to write.  It is just supposed to execute an order when the MA is below the Bid price.  In addition I am hoping that it doesn't let additional orders open if there is one already open.   Here...
is this really happened ?sellstop activated through the weekly gap of 100 pip?  
Hi, i have an indicator, i use in my trading, but i need to stay all time on my pc. i need an alert sound and show message in the screen. Can you help me?? the indicator is this
I want to make the daily transaction time: 02:00-23:30, close all orders before 23:30 every day. How should I write? void OnTick()  {     if( 02:00<OrderOpenTime && OrderOpenTime<23:30)       {         OrderSend(Symbol(),OP_BUY,1,Ask,10,Ask-100*Point,Ask+500*Point,"BUY" ,12345,Red)       }...
  Common Error (2)
Hi, Can any one explain this problem ? These Orders were done by EA. Thanks.
Hi There, I am using MT4 from last month only. I got this strange problem; In my marketwatch, if i open some stock, it opens in squeezed way(image 1) .But when i hit left arrow key chart restores to its normal state(Image 2). Its happening with 100+ Symbols but not with all the Symbols. The real...
I run 10 currency charts with the same set of custom indicators with multiple alert conditions triggering once every 4 hours.  I send those alerts out through notifications to my mobile.  I am working on a way to stagger the alerts by identifying the currency pair and creating a delay specific  to...
Hi everyone in the house, Please I need your help especially somebody who had gone through this before and how he solved it. I subscribed for a virtual hosting, precisely UK server and immediately I migrated my expert to the server, it start and then disable my expert after migration is successful...
Hi, I have a simple piece of code I'm trying to convert to MQL4, However I have no experience with TradeStation's EasyLanguage. The whole code: Inputs:        Cutoff(60);Vars:        alpha1(0),        HP(0),        Decycle(0);//Highpass filter cyclic components whose periods are shorter than...
I have learned the Turtle story and believe the Turtle strategy is a profitable one. I am trying to build an EA to play with it. I googled and downloaded a demo from Internet  <Deleted> The demo does not work very well, so I am going to learn mql4 and enhance the demo later. While I do the backtest...
1stDiablo
Hi Since 3 days i am working on getting MT4 running on Raspberry Pi 3 (os: Raspberian) .  Installed exagear and wine... Check. But every Installation of MT4 turned out as MT5. Don't know  why.  This was very strange for me. The setup was called MT4, the desktop link was named MT4, but the real...
Hi all, I'm working with EA "Best Scalper" on MT4. In order to understand what this guy is actually doing, I'm running several currency-pairs 24h with 0.01Lot. That creates some interesting data. To go more in detail, I would like to plot single trades by having a logfile for each (txt or xml would...
Hi, Is it possible to execute concurrent statements in mql4? Please advise. Thanks.