MQL4 and MetaTrader 4 - page 163

Hello All, Let me ask, I'm a newer in MQL4 and learnig to write EA with 2MA crossover. The result is that both Buy and Sell orders are issued. How to solve it, only buy or sell? Buy when MA1>MA2 and Sell when MA1<MA2. Thanks in advance. Kiae
Hi programmers, Hope you are having good days. I have a problem which I can not find my mistake, could you please point me the problem with this? It would be greatly appreciated if you give me a hand. #include "TicksInfo.mqh" CTicksInfo ticksInfo; input string AllPairsStr = "EURUSD,GBPUSD,NZDUSD" ;
Looking for feedback on this code. As of right now it complies but it doesn't execute trades in the strategy tester. Any help is much appreciated double SARValue; double SimpleEma; double Candle; double Candle2; void OnTick () { if (( OrdersTotal ()== 0 ) && (SARValue > Bid) &&(Candle <
HI, I need your help. I draw the horizontal Line on the chart by manual. And I want the EA to read the value (price) But when I draw it by manual, object name has some numbers. --> 38987 What is this number? TO read the price of the line, I want to use double Price =ObjectGetValueByShift(
  Metatrader 4  (4)
Is it still possible to download MT4 for Windows - the link I found on this site https://www.metatrader4.com/en/download said it was downloading MT4 but downloaded MT5 instead. Some signal providers only operate through MT4 so need that version. Thanks
Is there a possibility to set a pointer to the function as a class method (not a static method)? This example is without problems but only with a static method: typedef void(*TAction)();class Foo {private: TAction m_Action;public: Foo(void) {m_Action=Bar;} static void Bar() {printf("Function
Hi! I saw this indicator(ZIGZAG on fractals, without redrawing the values - https://www.mql5.com/en/code/10022 ) and I would like to get the last 2 values for an EA. The solution that I found only return one value for both cases (2147483647) using iCustom. this number means no fractal if we got
Thank you in advance for your feedback and help! Unfortunately, I haven't found anything about it yet and I've looked at a lot of code. My problem: I would like to receive the ALERT instead of the 1st candle 1 candle later. So the signal comes after the candle is closed and he should then wait 1
I just bought a new laptop with windows 10 on it. Now my mt4 does not appear right. Especially some of my custom indicators. For example I have an indicator called <Deleted>. It appears in the lower left corner and the text is all jumbled together and cant be read. Does any one have any idea what is
Hi, if I receive a trade signal push notification to my iPhone can an EA be programmed to copy that notification into a trade on MT4? Just basic entry, stop and TP with a predefined risk amount. See attached screen of trade notifications
I am using MT4 Build 1031. I run the Brazil System Prem EA on 8 charts on 8 different pairs. I experience this persistent problem. After a restart of MT4, the EA would not appear on some of the graphs. Only some of the graphs would load the EA. Which graph loaded the EA is random. Does anyone know...
Can you modify this EA to move SL to Breakeven+5pips (lock 5 pips after BE) when it get 20 pips in profit? Thank you
i am attempting to modify an indicator for MT4, by @Mladen Rakic I want to add std deviation lines to this modified atr-SMA, indicator. All help is appreciated. Free download of the 'ATR adaptive SMA' indicator by 'mladen' for MetaTrader 4 in the MQL5 Code Base, See my coding attempt attached. The
I'm pretty certain the answer is no, since the reference specifies order property operation types are for the OrderSend() function, but I was wondering if you can select a closed order using the OrderSelect() function (MODE_HISTORY), then get a return value of the order operation type using
Apologies if this isn't the right place to ask this, but I've had little luck seeking help elsewhere. I have a demo account and a live account with IG. I used to use a strategy on my demo account that involved setting three take profit levels. Since multiple TPs isn't a feature in MT4, what I would
Hi guys is im coding an EA that will only trade on a given session but broker time local time and GMT is confusing me. Im making a function that will trigger my ordersend if the time hits a given session example new york session. Is this the correct steps i need to do? 1. Get broker timezone 2. Get
Hi, I was in a form and still did not get the correct answer after the overall search. I'm looking for a way to get the distance between the two pipelines between the two moving averages of 15 and 60 Is there anyone who can help me on this topic? Thanks Translated by Google Translator
I need to add OrderOpen into my Listview Dialog. I put v_list_order() function in OnTick.Then I show repeat and repeat. bool v_list_order() { int total_v = OrdersTotal (); int v; for (v= 0 ;v < total_v;v++) { if (! OrderSelect (v, SELECT_BY_POS, MODE_TRADES)) continue ; if
I remember seeing a configuration you can use in MT4 that instead of showing the pips difference and price as you dragged the crosshair. It would show the profit and price as your dragged the crosshair. Does anyone remember where you configure this. Thanks in advance
  I'm tired  (4)
why i'm tired ? ho, let me think.. maybe because people ask questions without providing deatails or maybe because people ask questions that can easily get answered using a quick Search (top right corner on every page) or google or maybe because people are lazy and don't wanna spend their time to...
Hi I have this problem that I don't understand how to fix it. void OnTimer() { if ( pipsMA < Tradepip &&useMA && checkMA( 0 , true ) && isAvailableOrder()) { double lot = _get_lot_size(Stop_Loss); OpenTrade( Symbol (), OP_BUY, lot); } if (
is this the right code condition? //bearish and bullish engulfing pattern bool C_DownTrend = true ; bool C_UpTrend = true ; bool overlay= true ; double C_Len = 14 ; // ema depth for bodyAvg double C_ShadowPercent = 5.0 ; // size of shadows double C_ShadowEqualsPercent = 100.0 ; double
some one can slove it why TralingStop and BreakEven dont work with sell strades extern bool MON = true ; input string StartH1 = "03:00" ; input string EndH1 = "21:00" ; extern bool TUE = true ; input string StartH2 = "03:00" ; input string EndH2 = "21:00" ; extern bool WED = true ; input string
+------------------------------------------------------------------+//|                                                      ProjectName |//|                                      Copyright 2012, CompanyName |//|                                       http://www.companyname.net...
Hi, Some of the trades disappeared from the account history tab in mt4 platform (not because of the period filter). Is it platform or broker-related problem? P.S: I have contacted my broker and sent them the report from the platform. They sent me the same report with no missing trades in it
  open order at new bar only  (11   1 2)
Here's the correct one of phy code in start() function int start()  {   if(oldTime != Time[0] )      {      // first tick of new bar found      // do something useful      oldTime = Time[0];      }   return(0);   } I'm trying to get and ea to open an order at the start of each bar, and no other time...
I want a code that stop placing orders for x of time after place one in mql4. void OnTick() { //--- if (OrdersTotal() < 1) { if(emafast(0) > emaslow(0)&& emafast(10) > emaslow(10) && emafast(0) > emafast(5)) //&& emafast(1) > emafast(2)) { if(histogram(0)<-0.0001
Hi All Senior , I am very new into Mql4 code . Would like to seek for advise about coding , Appreciate anyone can advise and teach ...... Thank you and sorry if the code is messy i wanted create an EA that following entry : Buy Stop order at last 3 candle high above 300 point ( include wick) entry
Hi dear friends Is any one knows how to make the below code that it work?? It should read from "Callouts1.csv" (File is located in ...\experts\files\) ------------------------------------------------------------------------------------------------------------------------- int Handle; string...
[Deleted]
Morning, Fellow MQL4'ers How would one kindly calculate the margin required to open a position taking into account the leverage (100:1), lotsize (0.10) and an exchange rate factor? I can't do an OrderSelect() function because there is no order to select. I do have a fantastic currency conversion