MQL4 and MetaTrader 4 - page 331

  Help to fix EA  (5)
Dear my friends, I already code an ea followed this rule: 1. Open Order Buy when Price touch Low bollinger Bands, Close once it touch Mid band( SMA20), Sl 25 pip, tp 50 pip 2. Open Order Sell when Price touch Upper bollinger Bands, Close once it touch Mid band( SMA20), Sl 25 pip, tp 50 pip. it work
So, I want my EA on my ECN broker for all currency to have S/L at 30 points and T/P at 60 point. Here's my input code: input double StopLoss = 30; //Fixed Stop Loss (in Points)input double TakeProfit = 60; //Fixed Take Profit (in Points)input int
I have an indicator I use on MetaTrader MT4. All I wanted to do is alert me when it signals a reversal. How do I make existing indicator simply send me an alert. It seems easy but I don't know how
Hi guys and girls, I m trying to count how many sell orders i have at a certain distance from a Buy order. This is the code i got but it gives me wrong results. Thanks a lot. double OrderOpenPriceSell; int TotalSellOrders() { int SellOrderCount = 0; for(int i = 0; i <= OrdersTotal(); i = i
//+------------------------------------------------------------------+//| z_score.mq4 |//| Copyright 2020, MetaQuotes Software Corp. |//| https://www.mql5.com
  Strategy Tester Mystery  (16   1 2)
I have been testing an EA in the Strategy Tester (ST) and find a mysterious problem happens every time. I have wasted hours on trying to overcome this but to no avail! The ST jumps at one point with 3 hours (highlighted in yellow) because it seemingly stops recording for 12 seconds (11:18:44 -
Hello guys I am running an expert, when i check the expert tab its trying to open some orders with no errors , but these orders are not executed , what could be the issue
Hi ,i installed on my samsung s6 and in my mac MT4 ... when i copy the metaquotes ID of my s6 and try to send a push notification from mac ,a popup opens "the notification was successfully queued. see the journal for more information" and the notification doesn't arrive. On the smartphone i have
Hello, I am a Indian trader, and having a Custom Indicator that works great. I want to make a EA of it, but do not have any knowledge of coding. Absolute ZERO. Plz anyone help me to make it true
hi im trying to find the lowest of last 8 bars , if i put it like this double x=Low[iLowest(Symbol(),0,MODE_LOW,8,1)]; double xx=Low[1];Print("LOWEST OUT OF 8",x);Print(Low[1]); the x print fine ,but the xx print as 0.0, if i substitute the xx in the print statment with Low[1] i get the value i
I'm having trouble getting decent tick data for xauusd and xagusd for use with Strategy Tester. I usually get my tick data from Dukascopy, but with these metals, the data is corrupted or just doesn't want to work in MT4 (despite multiple downloads, deleting/replacing the .fxt files, trying
  Market: no trading operations  (74   1 2 3 4 5 ... 7 8)
Can anyone explain why the market returns this error? All the checks in the EA are in place... I understand the gist of course - there are no trades, but what is the reason
Anyone have experience using Strategy Tester with an EA which goes through a long process of loading and unloading indicators before it begins to make trades? (like, 100 times on 5 min bars). I experience this using imported tick data, so I'm wondering if that has anything to do with the issue
Hi, I have changed my sim card for a new operator and now i have no connection anymore an mt4 app. All apps get connection on mobile data but not mt4. I can connect my accounts via "Signal start". I try to uninstall and reinstall, clear app cache data but anyway...no connection. My broker is
Hi All, Is anybody aware of a mqh which will give you a DateTime value with milliseconds? E.g. 25.03.2013 13:09:01:123 I know this can be achieved via a DLL but I am hoping for a cleaner solution via a Include file. Regards Jimmy
My strategy is working on forex pairs but when i try to backtestmy strategy on indices like De30 or US500, nothing appears and im not getting any results. Does anyone know why? My EA is build on custom made indicator, so this will be linked too. The problem is not that it does not work. My EA is
Stop Loss calculated from money given is useful in two cases: 1. Fixing a Stop Loss to a predefined value to risk. Let's say $80. 2. Stop Loss as percentage of the current account balance. Here is the formula for calculating stop pips from account percentage: ////// The Account Percent Stop limits...
Hi there where is the mistake ? doesn't want to close the order :( Thank you :) if(h4==1 && h1==1 && m30==1 && m15==1){ if (ticket<=0){ ticket=OrderSend(Symbol(), OP_BUY, 0.01, Ask, 1, 0, 0,"Buy", 1,0,clrAqua) ;
double stopLossPrice = NormalizeDouble(High[2]-0.2*(High[2]-Low[2]),Digits); double takeProfitPrice = NormalizeDouble(High[2]+0.8*(High[2]-Low[2]),Digits); double lotSize = OptimalLotSize(riskPerTrade,NormalizeDouble(High[2]+0.1*(High[2]-Low[2]),Digits),stopLossPrice); openOrderID =
Can anyone point me to an example of code that can intercept signal data I have subscribed to in my account?  I would like to change the way autotrading is using the data but I do not know where I can intercept the data before it goes on the autotrader.  Thanks for any hints.
Hello gentlemens, I am facing an issue, I want to know the hour and minutes values on every candle. After placing: if(OnNewBar()) { Print(Hour()); Print(Minute());..... I always get 0 value, am I doing something wrong here
Hi there, I am new on MQL4 coding (and any coding) and I wrote this EA, it is not doing wrong, but, when it losses a trade, sometimes the parameters still fit and it would open another order right away and lose like 3 trades in a row. Is there a code that will make the EA to Stop Trading for X
  mql4 issues  (12   1 2)
Hi im writing an ea to check if moving average crossed then to check if the trigger candle is the highest or lowest candle out of 8 , there is only chance for two candles max after trigger to be swing high if not the trade will be false , but my code dos not work for some reason i know the problem
I'm looking for some way to test arrows placed on chart subject to time frame expiry as in the money or out of the money. Some kind of a back tester or simulator that keeps track of profit made or lost. That could be an indicator or an EA possibly? I've seen a hand full of testers by Google
Hello I have 8 CPU cores but MT4 use only 25% of CPU. please check attached screen shots. What can I do to use max possible CPU
hi im having issue i wrote a functionisthereactiveorder() if there is a buy dont open a buy if there is sell dont open sell it seems to not working, if any one can provide any guides i well be thankful #property copyright "Copyright 2020, MetaQuotes Software Corp."#property link
I'm trying to run mt4 on my mac using playonmac. Every time I try to install I am prompted to enter proxy server details. Surely proxy server shouldn't come into it. Does anyone know how I overcome this problem
Hi, Anybody recommend a good indicator that will place an order on a trend line. Thanks
Hi All, I am writing select data on my trades to a .txt file. My EA operates at the tick level. I calculate the current server time at the minute level = CMinute. At minutes 5,15,30,45,59, I want to "write to file" only once during that minute. I am currently posting, say on CMinute = 15, from 5-30
Hi All, I would like some code or function to get the Factor for any currency pair. I would use the factor to calculate the dollars of Profit/Loss for any given Lot size. For Example: Currency: EURUSD Lot Size: 1.0 Pips Move: +100 CalcDollars = 100 * (Factor @ 1.0 Lot) If calculated Factor = 1.15