Download MetaTrader 5

MQL4 and MetaTrader 4 - page 704

To post a new topic, please log in or register
I'm running the simple script: int index=0; int start() { while(index < 500) { Print(index); index++; } return(0); } And the indexing starts at 246 and runs to 500?
Hello Guys, I have two demos accounts with oanda and fxcm. I niether case the order gets submitted, and GetLastError() returns 130, with means worn stop loss. ERR_INVALID_STOPS130Invalid stops. If I change to ticket=OrderSend(Symbol(),OP_ BUY,Lots,Ask,3,1.4,1.5,"my EA",16384,0,Green); I still get...
  Data Type (1)
I have just downloaded a demo copy of MT4. The data has 4 decimals. Is there a way that I can change the data to 5 decimal places?
Hello, In mql5 there's the CopyRates function to get the latest rates. In mql4 there's no such a function, but there's RefreshRates(). The question is: How often should it be called? Right before calling OrderSend() or OrderModify(), for example? Or it's necessary only after there's a pause, such as...
  can't get my EA to run (29   1 2 3)
Hi i'm a newbe and i made an EA that compiled and loads successfully on to a chart. When using test strat the chart doesnt move. I put print statements at the Start () and other funtions() to see where it might be hanging up. But no displays at expert bar. Is there any suggestions. Thanks. Eample:...
  OBJ_VLINE (6)
Hello, This is my first time using graphical objects in an indicator. I would need to draw a vertical line everyday at the same time "22:00", could you please guide me to a solution? Thanks
Hi all, How can I get the foreground color of a chart? I want to display text in foreground color but could not find a way to get that color. thanks in advance
  Download daily data (14   1 2)
I want to be able to download daily bars for every available pair once per day. Is this possible to automate?
Hello to all I have redone the code so as that it will only BUY. No sell actions except to liquidate the BUY positions. Sounded easy enough. Everything was going well until I got down to the iSignalClose(). The code is attached and if there is anyone who wishes to add or delete for improvement, your...
Can someone please help me navigate this issue, I am testing my order placement script. The following trades take place in one script: Sell 10000 units. Sell 15000 units. Net Position is Short 25000 units. Close 5000 of above units. Attempt to close 5000 more units, but get FIFO error. Attempt to...
Why does my EA show a frowny face - can anybody help?
  MARTIN EA (3)
Hi guys, I’m fiddling with this EA these days but there seems to be a part in the code thats been giving me troubles. When plotted to a chart the EA delivers the following error : invalid lots amount for FreeMarginCheck function. I suspect that the problem occurs at 5 digit brokers since it’s...
  ERROR 129 (5)
I've read some other posts and just no idea how to resolve this problem. I am still using a demo account (on Alpari - may not be as reliable as LIVE account). I have an array MOT with details of all current orders. The following is from my own log. The 204762 is a reference to the write_to_log...
/*------------------------------------------------------------------+ |                                             fracmap_home         | |                                                 Copyright © 2011 | |                                                                  |...
  Trend Quality indicator(s) (125   1 2 3 4 5 ... 12 13)
These indicators are all based on a 2004 April issue of Technical Analysis of Stocks & Commodities article by David Sepiashvili. Originally there were only 2 versions developed by the author, but there were some possibilities that were not explored in that article which lead to developing some more...
Hi, my strategy is based on taking trades off of the four hour 5 EMA - in a buy, the stoploss is set at the lowest low of the last four candles, and the opposite in a sell. Somehow, in the backtest, only 4 trades are executed, and the inital stop is 4.0000 in the EUR/USD(for the sell order it took)....
hi! I am searching for a method (or script, ea, ind.) to display or represent the "3-line break charts" on the MT4 Platform instead of candlesticks or the other chart representations. Has anybody an idea to realize this ?...
Hi, I've written a custom indicator that uses data from a csv file located in ../experts/files/ folder, and I've got it working great for my needs. However, the source csv file changes each day, which means me downloading it and placing it in the correct location. I've searched extensivly but cannot...
Below is an EA that I am using as a template to build an EA for a system that I use. I am not an experienced programmer and I am hoping this project will allow me to build my knowledge of mql4. The below code is working well however I am stuck on one small part. This EA will currently only have one...
//I define the global array. string m_symbols[FX_GOODS_MAXNUM]; //set the value: for(int i=0; i<FX_GOODS_MAXNUM;i++) { m_symbols[i]="abc"; } for(int i=0; i<FX_GOODS_MAXNUM;i++) { Alert(m_symbols[i]); //print the string array to check the value, nothing is printed } Can anyone help me to solve...
It looks like GFT have pulled the plug for good on CTL / Chartstudio. As a result, I'm looking to port my code over to MQL. I've noticed the standard indicators, such as CCI, produce quite different results between the two platforms, enough to significantly impact my strategy/EA results. Has anyone...
I am working on an EA, which I know would be very profitable, but I have a problem. In Sell Position : it sells in a right place but for exit of that sell it close 13 pips above the right place. the code for alosing is : [[[[ OrderClose(Ticket,Cls_Lot,Ask,2) ]]]] please see the attachement for sell...
I have a Custom Indicator that displays different values depending on what Period() is used in the chart it is attached to. I have no extern variable to set the the period because it just uses Period() to set up the indicator. How can I pass a value to the indicator to let it know which Period to...
I just cannot figure this out in my head so I would reallyappreciate if someone can explain to me. I want to calculate the best lot size based on a knownnumber of pips stop loss. I know I can use code like this: double lots = AccountFreeMargin() * Risk/100 / (StopLossPoints * MarketInfo( Symbol(),...
Hi, I want to send an instant order through my EA that does have a stop loss but the no take profit set. Rather I want to exit the position on a specific condition criteria. Is it possible to achieve this? If so, how? Thanks
Hi, I have a csv file which is formatted as follows: GBPUSD,1.2345,1.2345,1.2345 EURUSD,1.2345,1.2345,1.2345 EURJPY ..... The data represents: Symbol, High Price, Low Price, Close Price I would like to import the data from the file, and match the currency symbol to the current chart, the use the...
Hello everybody, I am a newcomer in MQL4 (and only an occasional programmer). Currently I am working on my first EA attempt which should be a tick based EA. My problem is I need to get a certain number of actual ticks into a buffer (a tick array) before my start() function itself can start operating...
I am on my OANDA "practice" platform but it wont let me make trades (Off Quotes) to test my script programming. I hope I dont have to wait until after the weekend?
Hi, My code below tries to check RSI for all timeframes. I am checking the time and looking into whether it's a barclosing time. So forexample between 12:30-13:15 there should be 45 M1 bars, 9 M5 bars, 1 M30 bar so on.. But at every tick (start runs) it finds new bar from M5 to D1 and I see time...
Hello, when trading day is over I sometimes need to analyze past data and look at them in detail (in order to improve my trading approaches). The way I am doing it now is, in fact, bloody. I am letting my trading platform list the prices for specified period of time like... int start()     {...