MQL4 and MetaTrader 4 - page 234

I am currently working on a VWAP indicator that starts calculating at the beginning of each week. I can get the indicator to restart each week and continue into future but cannot figure out how to correctly loop through all bars to get past values. Please help
The old code was if (Cur_ClosePrice <= openPrice - STP * _Point ) { int res = OrderClose(OrderTicket(),OrderLots(),Bid, 3 ,CLR_NONE); if (res != - 1 ){ OpCnt--; BuyOpenCnt--;
i've backtested this EA but it only gives the result of one day (only the beginning day of the backtest). try it yourself and you'll see.  For example, I want to backtest GBPUSD from 5 May 2019. But the backtest result only shows the result on 5 May 2019. And if I change the date to 4 May 2019, then...
my trade accout has frozen,the screen is stuck on'update' and i no longer can trade. i was also trying to open up a demo account around the same type that it froze. what do i do,matthew warren
  Error 4066 HELP  (4)
Hi!. I'm asking for help, because i'm not really understanding what should i do to avoid error 4066. Basically, my goal is to store the value of iTime and iBars inside some variables right when the bot gets initialized. The problem is that i cannot do initialize the variables in the OnInit()
Hello everyone. I am trying to download a bot for MT4. I am using this URL: https://www.mql5.com/en/signals/mt4 When I click to buy them using the Start copying in MetaTrader, mt5setup.exe is the only thing that downloads. How do I select from these robots? Thanks
Hi everyone, is possibile to use the MQL5 Cloud Network with metatrader 4? it is mentioned in this guide for mt4 but I can't find it https://www.metatrader4.com/en/trading-platform/help/autotrading/tester_optimization
I would like to know if this is possible, i have a script that i want to test that check some data from the latest 2 Hour 1 candles, but i want to be able to run the script on a history timeline, not only live. Is possible to run a script in a previous timeline? I prefer to not alter the code for
Hi, I've got an indicator I bought in the market that has too many parameters to be called by iCustom function in my EA This is the code I used iCustom ( Symbol (), Period (), indicatorName, ""
indicator is not ploting properly and not ploting levels on many chart. its plot on previous chart but its not ploting in current chart. its coming in forex chart on mt4 but not coming on other scripts of same broker
  EA related issue - Urgent  (13   1 2)
I would like to know if i'm running an EA on a broker MT4, is it possible for the broker to make out how the EA is working and about conditions EA is taking the trades?  Is it possible for the broker to take away the system on which EA is working? Reply from experienced coder or programmer is highly...
  function error  (1)
Hi everyone I have this simple code function that give me an error message "'}' - not all control paths return a value" bool GreenCandle( int shift = 0 ) { if ( iOpen ( Symbol (), PERIOD_CURRENT ,shift) < iClose ( Symbol (), PERIOD_CURRENT ,shift)) return true ; } I have a return value but why
i hello.i am about to use a telegram to mt4 trade copier.i want to ask though, is thill possible seeing as i am also connecting my tradingview to telegram through webhooks
Hi everyone, is there a magic number for manual orders? some on this forum have a view that by default it is zero. is it so? is there a reliable way to identify and differentiate between multiple orders placed manually
  Pip counter  (3)
Hi guys,i'm new to mql4 programming and i want to make a "sort of" martingale system. Right now the code looks like this void OnTick () { if ( OrdersTotal ()== 0 ) { OrderSend ( _Symbol , OP_BUY, 0.01 , Ask, 3
Hi guys hopefully someone can help. I have an EA that should take trades at a certain time of the day and based on a bullish or bearish candlestick but it does not execute anything and there are no errors. This is how my code looks: input string TP = "Make sure its not zero and over a certain amount
MT4 Software Push Notification to Phone App Suddenly Stop Working. Please Help
  RefreshRates()  (2)
Great for the current chart. But my EA needs to pull the latest Bid/Ask pair from other symbols. How can this be done efficiently? I am assuming MarketInfo? ex. double NJask=MarketInfo("NZDJPY",MODE_ASK);
hey guys can someone please help i have the alerts on my mt4 paltforma and they cant seem to go away as am not really winning on them...can anyone please help. many thanks
I am experiencing a strange problem using iHighest to find out the index of the highest bars. It works for smaller number of bars, but if i test it with large number of bars then its giving me meaningless index value. int val_index=iHighest("EURUSD",5,MODE_HIGH,650,600); Print(val_index); the code
  error vps old archive ex4  (20   1 2)
can someone help me with this synchronization error
Hello freinds, I need your help. I want the EA to check an operation every two minutes. The simple way is to do: if ( TimeMinute(TimeCurrent()) != 2 && TimeMinute(TimeCurrent()) != 4 && TimeMinute(TimeCurrent()) != 6 && TimeMinute(TimeCurrent()) != 8 && TimeMinute(TimeCurrent()) != 10 &&
Hello, I am trying to solve a problem, but I find it difficult. For example, I want the indicator to be blue only if the current buffer is bigger than the one before or exactly the same size. And red it should be only when the current buffer is smaller than the one before or exactly the same size
Hi there, I was wondering if there is any way to view the stop loss amount in a new order by currency instead of by pips? It is now often totally unclear to me how much I will lose or win when setting a new order. Is there a setting for this? Or a tool? Thanks in advance, Johan
Hi everyone, i'm working on a script that count the trades. Firstly, if there is no trades on the required direction, open a trade. My problem comes at the second trade. The condition for the next trade is being at profit and calculating the total profit. The next trade's risk based on the total
  10points 3.mq4  (4884   1 2 3 4 5 ... 488 489)
Have traded this EA for 2 days with very good results on a $25000 demo account. Has anyone had longer experience and would like to comment on their findings. FxS Forex - Scripts - Home log in to find that it is the most downloaded EA from their list 10 points 3.mq4 John Edited for update purposes:-
Hello, In mql4 and mql5 documents for SetIndexBuffer() said " After binding, the dynamic array buffer[] will be indexed as in common arrays ". As I tested, this is right in mql5 but not in mql4! When we define double buffer[] it is a common arrays, after using SetIndexBuffer(0,buffer) the buffer
I have a question regrading on the OrderMagicNumber. I knew that we can set a manual magic number in the EA settings to set our strategies. But I counter a problem which is during backtesting which I track down previous order by using for ( int i=OrdersHistoryTotal()- 1 ; i < OrdersHistoryTotal();
Hey guys,   If you could change/improve anything on the MT4, what would you do?   I'll start :) I would love to see the MT4 to provide a margin calculator from within the platform so I can calculate my used margin before I open a position.    Looking forward to hearing your opinions!