MQL4 and MetaTrader 4 - page 1143

[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
[Deleted]
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...
  Channel, what are you?  (76   1 2 3 4 5 ... 7 8)
I suggest we discuss the following question. We all know what a price channel is, of course, and we can easily identify it visually. But how do we formalise this process? Does anyone have any ideas about what is the criterion of "channeling" of a certain period of history? Obviously, a simple
[Deleted]
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()     {...
[Deleted]
Hi i wonder if anybody has experienced this problem with iMA. i am creating indicators with two different time frame but when im running it, it doesn't work I am getting the MA from the open chart and not from the time frame that in the code i want it to work on 15 min and 30 min.please whats wrong...
Hello out there, I just installed MT4 to my HTC touchpro smartphone, i need to load 4 settings of the same indicator in the same indicator window on my chart but i have not been successful at doing this. Once an indicator is loaded on an indicator window other indicators will load in the same window...
[Deleted]
Is it possible to run a strategy that places several orders on the strategy tester? When I want to test my strategy it only has a dropdown box where I can only choose one instrument and it will only give me feedback for one instrument as opposed to all the instruments collectively
[Deleted]
hi, 1- how can I set below expert advisor in my fxopen navigator? I like sometimes it trades with more than 0.1 lot. 2-do you know best currency-pairs & timeframe for this ea? 3-it opens & closes positions itself but after open a position, there aren`t any stoploss or takeprofit on the terminal,...
[Deleted]
see this example....thanks
[Deleted]
Please help advise how I can save some price values of a bar or an identified range. E.g lets assume my choice bar is 10.00GMT H1-bar, and I wish to save the vales of High and Low at 11.01, and I will like to use these values throughout that day for decisions in my EA. Or I probably I wish to pick...
[Deleted]
Hi I have a profitable EA that gain a lot in the back testing, it opened around 2000 orders and seems like its doing good however there were some cases when it didnt open orders in the back testing, so i tried to check it for a while on my demo account and in order to compare the results with the...
I using this code string row= "" ; query= StringConcatenate ( "SELECT id FROM table1" ); length= StringLen (query); mysql_real_query(mysql2,query,length); int result = mysql_store_result(mysql2); int numOfRows = mysql_num_rows(result); Print ( "numOfRows:" ,numOfRows); for ( int i= 0
[Deleted]
  Why return 133?  (1)
I use the MT4 platform from Pro Brokerage. The simplest operation, OrderSend(Symbol(),OP_SELL,1,Bid,3,0,0,"",MAGICMA,0,Red), returns 133(trading is disabled) all the time. Who could help on this? Thank you.
[Deleted]
I am brand new to MT4. I am playing with some simple commands such as Print ("4"); It is working. But if I change it to Print ("3"); and save and exit and run the script it still returns a 4. Only after I close and reopen the platform will I get a 3 returned. What is the problem here?
[Deleted]
Is there a function in MetaTrader that closes all orders that are open and pending?
FREE VOLUME INDICATOR
[Deleted]
hi im looking for a linked program to a trading platform to trade for me EUR USD a program that buys and sell for me automaticly at a set price that i tell it to. Once triggers price and once it hits price again long or sort it will keep on hitting that possition till i cancle that fixed price does
A few questions regarding ticket numbering and OrderSelect()behavior: 1. Is it guaranteed thatorders opened have ascending ticket numbers? So for example - if order x wasopened AFTER order y, is it guaranteed that ticket x > ticket y? 2. Regarding 1 – is this a broker specific behavior...
[Deleted]
Hi I have this code as part of a function in my EA, basically it looks for breakouts of the upper and lower bands from the start time (bar) thats is specified earlier in the in the EA, up to the current bar plus 3. By defualt the fucntion returns an empty_value unless I break out the bands is...
[Deleted]
hello guys, need little help here.. I'm not a programmer and having a little issue with this code; int cnt = OrdersTotal(); for (int i=0; i<cnt; i++) { if (!(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))) continue; if (OrderSymbol() != Symbol()) continue; //if (OrderMagicNumber() !=...
[Deleted]
Im a newbie coder so bare with me, written a code that buys when short liner wighted MA crosses above long liner wighted MA and Psar showing an uptreand and sells when when long liner wighted MA crosses below short liner wighted MA and Psar showing an downtreand. but it only opens buy possitions and...
[Deleted]
If I want to risk buying lots with 1% of account each trade, how do I code that. How can determine how much lots to place the order for if my account is 100,000. so 1% is $1000. and I want to buy $1000 worth of lots. Would the same code work if I used the EA on micro-account? How do I go about...
[Deleted]
hi guys can im new to EA Programming thus can any one specify a function or a algorithm to calculate number of bars elapsed since 2 successive loosing trends thankz