MQL4 and MetaTrader 4 - page 1132

To post a new topic, please log in or register
Is there a way to have an EA or Indicator's Start function called at a fixed interval, e.g every 1sec ? I'd like to make decissions right before bar0 closes, but especially at low TFs the ticks are useless for this purpose.
I am a begineer in MQL, I have test my code on the tester but I dont have any result (0000 at all fields) Here is my code, please help me. //+------------------------------------------------------------------+ //| ST_V001.mq4 | //|...
hello, how can I insert a level SC8 /!2 with metaeditor into MT4/navigator so I start scalping a chart ? I have managed to bring the mq4.files into the meta editor and used compilerbutton, did not close file/ exit and did not start MT4 new ( restart)
I was wondering if there is such a tool that would permit me to visualize my code while backtesting, and permit me to single-step at the same time through the code. This would be a wonderfull tool to debug, optimize and understand what is going on in the EA, saving an uncalculable amount of time....
My older version of SBFX stopped working (No Connection signal) several weeks ago. I went to the sight several times and it was not available for anything including downloading. I got an email today from the "Community" and went to the site and downloaded the latest version. Same problem - No...
Has anyone had this problem? I backtested my EA this morning on the strategy tester and it worked like a gem....market is now open, I placed the EA on my pair and all of a sudden it is placing one buy and one sell immediately without my trade conditions being met! Anyone had this problem? Can anyone...
I'm trying to check AcountName in external DLL: I have no problem with AccountNumber: MT4_EXPFUNC int __stdcall Test( int MyAccountNumber ) { if( MyAccountNumber == 12345 ) { return(1) ; } else { return(0); } } But how can I do the same with...
I have a custom indicator that Draw Text on chart(When someconditions met) and i can get it fixed in the low of the bar,(Even whenTime frames change) but i can't do the same in the High of the bar, the text is drawn inside the bar, !! I think the problem is that because the text is starting...
I created this indi to help me decifer from normal volume change for that particular time of day and abnormal change. For instance on the hourly chart it takes all the 5pm bars from the last x days and plots the average at 5pm current day.
Hi, im looking for script which close all positions (opened and pending) when overall profit is hit . It doesnt matter which positions makes profit or loss. Key is to close all not when position made profit, but profit overall like +500$ maded by all positions even if 2 positions are with loss....
New article Visual Testing of the Profitability of Indicators and Alerts is published: What indicator of trading alerts or just the methods of theircalculating to use is usually decided when testing EAs using thesealerts. However, it is not always possible/necessary/reasonable towrite an EA for each...
Can someone show me sample code of how I can execute a function after a bar closes? I'm trying to avoid checking bar[1] with every tick.
I'm doing some testing and I cant figure out why I get "unbalanced parentheses" on this. Could someone be kind enough to tell me why I get this error from the compiler? ____________________________________________________________________ extern double LotSize=0.01; extern int StopLoss=25; int...
How can I get the pixel values of a corner of a window indicator relatively of the screen, considering we can change the size of a window. Thank you
Hello. I need help for something that is still unclear to me. I am practising on the MACD simple EA, and i.e. i want to include in the order send, not only the Takeprofit but also a stop loss. The instruction in discussion is: """"""" ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0...
Hey all, I am pretty new to programming, in particular to MQL4, but I do have a strong math background and have done a lot of work in abstract math and the like, so I'd like to be able to implement some algorithms I have ideas for. I have been reading through the book, but am left with a lot of...
What MQL command can I search last two min. and two max. prices of the recent300 candles, and how to draw lines by those min. prices and max. prices - connectingthe two biggest min. (the first red line) and the two largest max. prices (the second green line) of the recent 300 candles ?
  phy
Hi phy, I send you a pm and wait for your suggestion Thanks
Can someone explain this:
hi please help me for closing the last position . when I have 3 positions opened, what is the formula so that I close the last position, for exemple last position is sell EUR/USD in 1.2288 and take profite 50 PIP in 1.2238, if the chart retourn opposit the sell and IF chart = 1.2888, close this...
In regard to using 'strategy tester' does anyone know why all orders are closed at 11.59 (midnight of chosen test date) resulting in massive losses? I can't get valed results as tests end up with massive losses due to all open orders being closed at conclusion of a strategy test.
Hi! I am kind of new to this and I am tying to get an OrderModify to execute on every new bar. I want to place a BUYSTOP and a SELLSTOP some ticks away from the current price and refresh the Price, StopLoss and TakeProfit on every BarClose. For example if I start by placing a BUYSTOP and a SELLSTOP...
I am writing a custom indicator. The indicator is in a serarate window. I want to know the way we can set the minimum value of the window dynamically or auto-scale dynamically. I understand the other complicated method of using ObjectCreate() and WindowFind(). I am wonderig if there is a dynamic...
Is it possible to make 2000+ PIPs/month, consistently?
hi I would like add something in the next EA, but I dont know how to do that first of all I would like to add 2 thing in "input" the first one is a number of period and the second is a number of pip. and I would like that the EA only take a position when the real number of pip is lower then the...
Hello, in my EA i use tags to manage orders. It seems not to work and i think my comments are a bit too long (ex : Upperband range - Short order opened <XXTO>, where the taf is between <>). I will reduce a lot my comments length but for my knowledge i would like to know the limit if one exists. I...
Hi, I'm trying to download then data center service. According to http://www.metatrader4.com/forum/73 it should be found here: http://www.metaquotes.net/files/mtdcsetup.exe But the url seems dead. Do anybody know where I can download data center? Best regards Grufgran
Hello; I need please to know how can I make Test for Expert, to get the real rezults. Please is there any one can help me. I will be Thankfull. Have a nice day Thank you;
What is the easiest way to know if it's almost the end of the day or the market has been closed?
Hi everyone, I tried to store a price value into a variable: double price = Ask; and then Print("price", price); to check if it be stored properly, but it seems not be stored, the result shows 0. Who can help me find a way to store a price value into a variable? Thanks a lot.