MQL4 and MetaTrader 4 - page 408

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 ....
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...
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, 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...
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.
void start() { int i= 0 ,nCountedBars; //i=0 added instead of just i, in order to get rid of warning when under an EA template bool bFound; double dCurrent; nCountedBars= IndicatorCounted (); //---- last counted bar will be recounted if (nCountedBars<= 2 ) i= Bars
[Deleted]
I have an optimizated EA. It is profitable but on live account is negative. I don't understand. Is back testing totaly lie? You can see the result: https://www.mql5.com/en/signals/451038
I do not understand why this code is causing an error about a FIFO violation. void CloseAll() {   bool resultClose;      for(int i = 0; i < OrdersTotal(); i++) {      if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {         if (OrderSymbol() == Symbol()) {            switch(OrderType())...
pls i want to ask is it possible to remove automatically remove an EA from mt4 if more than one ea attached with different name expert something like ExpertRemove() if another EA is detected... or return(0) if more than 1 expert attached....thanks
Help please. I have calculated the average price using an exponential moving average on 5 min time frame. Where sym is the chart symbol because I am trading multiple charts with an EA attached to a chart. See below. map = iMA(sym,5,3,0,MODE_EMA,PRICE_MEDIAN,0); The values are different from the...
hi i have a problem with my trailing stop function in here in the code below i just want to open a buy order then use the trailing stop in it but simply its not working and doesn't modify any orders. i would be thankful to pick your brain input bool use_trailing=true;input int...
Hello, I have the need to download MetaTrader 4 for development purposes.... I tried this link https://www.metatrader4.com/en/automated-trading/mql4-ide, where I got the file mt4-setup.exe; but once clicked on it, and finished the installation procedure, I found MT5 instead of MT4. Why ?
  Coding  (4)
Hello everybody, I just wanna ask some help in coding this strategy: {If candle 3 close and the RSI crosses below level 20 and candle 2 close below RSI level 20 and  candle 1 close below RSI level 20}; open SELL position and opposite with the BUY position Thank you very much. I hope that somebody...
Hi, I'm trying to code a stochastic for M1 which take the data of M15. Somehow it doesn't works. been trying to figure out. Any senior could help me. thank you!! Here's my code iMA ( _Symbol , PERIOD_M15 , 50 , 0 , MODE_EMA , PRICE_CLOSE ,i)> iMA ( _Symbol , PERIOD_M15 , 100 , 0 , MODE_EMA
Hi, can someone help me out how i can get the number of total trades make of an ea based of magicnumber ? Is there a function i can use and than i will show the number as an comment? Like this:  Total trades: <<number of total trades made by the ea>>