MQL4 and MetaTrader 4 - page 121

Hi, my trailing stop is activated when reach 1/2 stop loss or profit. Trailing stop skače between 2-3 pips. Code: void tStop( string symb, int stop, int MN) // Symbol + stop in pips + magic number { double bsl = NormalizeDouble (MarketInfo(symb, MODE_BID) - stop * MarketInfo(symb, MODE_POINT)
I have problem with string array. Its says "array out of range" when I loop the following, It will only open "NZD/USD". Why? string symbol[]={ "EURUSD" , "GBPUSD" , "AUDUSD" , "NZDUSD" }; string symbol2[]={ "USDJPY" , "USDCHF" , "USDCAD" }; for ( int a= ArrayResize (symbol, 4 )- 1 ;a>= 0 ;a--)
Anyone know if compatibilty issues with Gomarkets will be resolved soon. It has been a problem since Monday 22/08/22. Charts working on MT4 but no account details, no EAs, no trades from Gomarkets
Hi there, When backtesting in the Spread settings of MT4 you can custom select a spread - If I set this to '2' - does this mean 0.2pips? Or if it's set to 10, does that mean 1 pip? Thanks! James
Hi everybody, Coming back after 3 years , triing to run my EA which ran very well before, compilation are not allowed now, it let me 3 errors. It was running perfectly without any errors before. there 2 sames errors about an Array, and Error about Date. Is somebody could help ? Seems just to be able
Hi everyone, I'm quite new to Metatrader 4 and trading in general. Could someone help me answer this question please? - If I close or change (SL/TP) an open trade while the market is closed during the weekend, will ''the order'' take effect as soon as the market opens on Monday ? Thanks for your
<Decompiled code deleted> But the result was wrong
Hello Supply and Demand Traders, I have a custom expert advisor which trades off supply and demand zones.  The zones it trades off are from this source - https://www.mql5.com/en/code/14545 (indicator attached below).  Here are the rules of the EA: - When price reaches the proximal level of an...
I was reading up on the push notifications, with an android phone. I have a custom indicator that gives buy/sell alerts, could the notifications be used to send the alerts directly to my smartphone?
int OnInit () { Comment ( "Today is" , DayOfWeek()); Comment ( "Balance =" , AccountBalance()); return ( INIT_SUCCEEDED ); } After entering this code I get this: (screenshot) I want "Today is" and "Balance" to be written in a row. How can I do that? (c) Sorry for stupid question, I am totally
Is there way I can login to MT4 with python execute a trade and logout. Apart from metaapi is there any Rest API service. Please help there thanks
Oanda recently "upgraded" all of its clients to the V20 servers, but the servers are giving a value of "true" even if the market is closed for: MarketInfo(Symbol(), MODE_TRADEALLOWED) This method for determining if the market was closed worked perfectly fine prior to the "upgrade", but now it's...
Hi I have this indicator with higher timeframe setting. When I backtest the indicator, it shows somewhat broken indicator. Here's the indicator on real chart, and here's when I backtest it, I tried another indicator that has multi timeframe setting and the result is the same. Every time I used a
How can I restore "volume" template? I unintentionally "removed" the Volume template, and now do not know how to get it back in the template menu. I already uninstalled and re-installed MT4 terminal
[Deleted]
Please look at the attached file for full code. **** int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) {} double TakeProfit,StopLoss,start_price; } int fun_vol() { if (Volume[ 0 ]> 1 ) return 0 ; else return 1 ; } int fun_touch( int stauts) { if
Please can anyone add sl tp in my script #property copyright "Copyright © 2014, Zulutrade Inc" #property link "www.zulutrade.com" extern int BuyThreshold = 40 ; extern int SellThreshold = 30 ; extern double Lots = 1 ; extern int MagicNumber = 33 ; extern string comment = "by example script" ; extern
  MathRand()  (5)
Hi all, could you give a criteria on how to use MathRand() function to open orders? Something like this: if ( MathRand() ....) BUY if ( MathRand() ...) SELL Betterif these two conditions have around 50% probability each one. For istance, if MathRand() is an equal number BUY, else SELL. Hope is...
Hello friends How can I save a photo from the web to my PC(MT4 folders)? I saw some users talk about using WebRequest (). Can you give an example? For example, if I want to save this photo https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png in one of MetaTrader's
Hi, how to change this code to moving average setup? want to add 2-3 EMA with changeable value.. extern string SignalSetting = "---------- Signal Setting ----------" ; extern ENUM_APPLIED_PRICE ApplyTo = PRICE_CLOSE ; extern string Setting_ = "----------- Stochastic -----------" ; extern int Kperiod
Hi MQL community, My EA from time to time executes a trade when my division1 value is greater than 0.50. Is there an obvious error in my code? FYI, I run about 30 EAs in different pairs with similar code, however, they each use a different magic number. Also, I'm getting no error messages in the
Hi, I want to get what candle Bearish/Bullish closed above/below using MA. This is my code, but not works. double ema13 = iMA ( _Symbol , _Period , 13 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); bool bullish1 = Close[ 1 ] > Open[ 1 ] ? true : false ; if ((Close[ 1 ]> ema13)&& (Close[
Hello, I want to backtest My EA on the broker IcMarkets. When I print: Print(iLow(_Symbol,PERIOD_D1,0)); In the Journal of the Strategy Tester, I receive the lowest dayily price, no matter if the day just started and that price is going to be touched only hours later. Seems like this Print gives
Does it mean I should write the code under the event handling function? I'm doing it here, but still error. void OnTick () { double takeProfit = NormalizeDouble ( Point *TakeProfitS, Digits ); double stopLoss = NormalizeDouble ( Point *StopLossS, Digits ); double shortStopLoss = Bid + stopLoss;
Good morning, I need an help to understand how my OANDA demo account works. At 12:28:43 there is a Financing row (-0.19). At the same time a sell stop order is deleted and a buy position was partially closed for the same size of the sell stop order. I am 100% sure my expert didn’t place these
Hello friends, If you did some research on trading bots you might have noticed the steady growing equity curve of most bots with some big spikes inside. I always wondered how most bots turn a profit and found out about the martingale gambling strategy. With martingale you start with a x amount of
Hi, Can I ask some questions regarding MT4? i'm asking this because it's mql5 forum, but i can see mql4 questions here. is it allowed
Hi. is possible to get M and W pattern (check in attachment image)? Regards, Chris
I have a problem when using string arrays. When I drop my EA on GBPUSD it will not open and others pairs. It only opens on the 1st arrays "EURUSD" and " USDJPY ". void BuyTrade() { int Final= 0 ; string Base[]={ "EURUSD" , "GBPUSD" , "AUDUSD" , "NZDUSD" }; for ( int Loop= 0 ;Loop<4;Loop++)
  Pin Bar  (6)
Hi guys, I have a problem with the code. I want to find the Pinbar (1) as in the picture excluding the Pinbar (2). I would say that the length of the shadow must be> = 3 times the length of the Candlestick Body. I wrote this code but it does not work.    ....... myPoint *= 10;...
I don't spend much time in forums so this thread might seem silly but I would liketo know how to find a quality trustworthy programmer. I have not had much luckin this regard so I am assuming there is something I am missing. What type of qualificationsor certification should I be looking for that...