MQL4 and MetaTrader 4 - page 277

  while and sleep?  (7)
Hi all, A friend of mine asked me a question, I simplified it down to the following test code: extern int TimeInterval= 900 ; // xx minutes to send the e-mail int start() { while (TimeInterval> 0 ) { SendMail ( "someTITLE" , "someTEXT" ); Sleep ( TimeInterval* 60 * 1000
Hello, A short question I haven't quite figured out. Can an indicator/ea know its filename? Sort like the following. Thanks! String fn = WhichIsMyFileName();if(fn == 'MyIndicatorName.ex4'){    DoSomething();} else {    DoSomethingElse();}
Hi, I have an EA and installed MetaTrader 4 Client Terminal build 610, it seems everything is fine, EA is working as expected, but there is a warning in the toolbox, which I cannot understand: sign mismatch I use a function taken from https://www.mql5.com/en/articles/1412 and the warning is in this...
Hi. I am trying to change the external bool value from true to false,but every time i restart the terminal it changes back to true.Is there a way to do it? extern bool reset = true ; void OnTick () { if (reset== true ) { int handle = FileOpen ( "Time.txt" , FILE_COMMON | FILE_WRITE );
I control the terminal from a remote process. I load any script on the chart without using a DLL. The scripts load and work. As soon as I load a script using any library, the terminal hangs. Of course, all the scripts with libraries work if they are loaded manually. Anyone have any idea? I should
Good afternoon, I am having problems interpretating fractals because the indicator does not behave as I have read it should. This is what I though a fractal was, and it should be componed with 5 bars, right? Instead, MT4 is drawing fractals everywhere, not componed by 5 bars or any pattern that...
When I run a backtest, it seems to give me the results, which I will just assume are accurate because I have no way to verify. I would think it should give me a detail of every time that it entered and exited the trade during the time period, but I guess not? This example says 1 "pass" (what is a
Hello and if someone would please help with coding simple yet I believe would be a great scalp counter trade strategy if you can master this. I have been testing this and I believe that I have pretty much mastered it to where I can trade this 100% of the time and be successful at it. I just don't...
Hi There, As the documentation says, the OrderSend function: Ord Returns number of the ticket assigned to the order by the trade server or -1 if it fails. It should return the recent opened ticket number right? But it always return 0 for me... Here is my code: int ticket= OrderSend ( Symbol
//+------------------------------------------------------------------+//|                                        super-signals-channel.mq4 |//|                Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |//+------------------------------------------------------------------+#property copyright...
i am a rookie trader started a few weeks ago i am using MT4 recently my EAs dont work anymore. Before they stop working completely,they use run for a while then stop,now they stop. smiley face is on ,DLL is enable both in MT4 option and in the EA,autotrading is enabled,live trading is enabled. i
Does anyone have the know how to compile these two indicators? errors are preventing it loading in MT4 Ideally I was trying to find UDC but doesn't look like he's been active in years =[
Where can I find historical tick data which can be loaded into MT4 for back testing with an expert advisor? All the searching I’ve done (perhaps I’m not familiar enough with the industry terms to target accurately) keeps finding either the wrong platform (not MT4) or not FTSE 100 data
admin , please send this to MT4 manager hi many traders say metatrader is bad , high risk platform, it dont have any risk manage, limitation for lot size, margin level ,daily loss in metatrader 4 (like ninja trader) in tools(menu) put limitation for max allow loss and min margin level and max
Hi i wrote this code for breakeven function. Its work for buy order but not working with sell order. I checked several times the code but i dont found the trouble. Maybe some one can help me with this. Thanks before void MoveToBreakeven() { for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { if
  MQL4 Learning  (1372   1 2 3 4 5 ... 137 138)
[CUT] This post was deprecated.
Is there a way to set MT4 to automatically close a trade (Partially) if the profit per lot hits a specific number? Like if I have a trade open with 0.06 lots if profit hits $5 per 0.01 lot (total $30) then close half trade (AUTOMATCALLY for any open trade)? - Well I was wonderingif there is a way
  Need help on codes  (18   1 2)
whats the code if you put one indicator in another indicators window? like 2 indicators in one window.. example if you merge MA to stoch window? double EMA = iMA (Symbol (), 1440, 8, MODE_EMA, ???????,0) or should is use iMAOnArray? please help
I want to change color of candles when fractal breakout happens.... I have attached some pics so you can understand what i mean... Can anyone Help me ? I use MTF Fractal indicator so I want to change d color of candles when fractal breakout happens but d way it happens in pics.... please see d
  MT4 problem  (1)
I am a Fores Trader and am using an Expert Advisor to assist me. His programmes are based on MT4 because MT5 language is different to MT4. I have logged into the MT4 app on my Apple PC, but when I attempt to log on your MetaQuotes it transfers me to your MQL5 platform and it will not allow me entry
Hello, I have bought an EA and set it up on my mt4 platform but am having two minor issues with the settings. 1) The Server time is set to GMT 0 I am trying to get t to trade at GMT 22 to GMT 1. It starts trading every time at GMT 23 2) I also have set it to trade 0.07 units per trade...But it
Hi guys , i created a memory mapped file in C# this is a coded using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO.MemoryMappedFiles; using System.ComponentModel; using System.Windows.Input; using System.IO; namespace
Is there any tool for MT4 eas that can open trades on a given timeframe? So if an ea reaches distance for opening a new trade it should only do that in given tf (e.g. TF H1 means, ea opens max. one trade every hour)
Hello, Is it possible to run fully automated EA's on the MT4 mobile app? I have my broker account uploaded onto MT4 mobile
  MT4 Timeframes  (3)
In mt5 we have additional timeframes like M2 H2 etc. Is there a way on a life chart to get these bars in Mt4. [Will post my code currently on mobile phone] I tried to create arrays for OHLC and then to calculate bars for e.g M2 and the populate the arrays. But I have a feeling I am doing unnecessary
  Pivot Points  (2)
Hi everyone! I am trying to get my EA to make decisions regarding the Pivot Points, I have declared them in the header and I placed a comment to see the result, however it only calculates me with respect to the candle before the one it starts, if a new candle is opened it does not recalculate. Can
hello, MT4, how to create a blank window (to put my multi-currency indicators) ??? thank you
I have an EA which works, but in reverse. If I swap the BUY and SELL trade entries round, it doesn't change anything. What is needed is at the bottom of the chart, it will enter a BUY, and at the top a SELL. The trades are close by Trailing Stop Losses. In the attached screenshot, the blue arrows
Hi staff, today I downloads a new history files on EURUSD from Tickstory. I stored these files in my directory G:.../EURUSD. That directory have a subdirectory FXx. Afther the download the files *.hst there are on my directory EURUSD and the files *.hst on my subdirectory FXT. Before import new
  Help, on Trade Counter  (28   1 2 3)
int SellCount() { int No= 0 ; int Total= 0 ; int CurTicket= 0 ; int LastTicket= 0 ; // if(OrdersTotal()>0 && OrderType()==OP_SELL && OrderMagicNumber()==Magic_Number_1) // { for ( int i= OrdersTotal ()- 1 ; i>= 0 ; i--) { if ( OrderSelect (i,SELECT_BY_POS)== true &&