MQL4 and MetaTrader 4 - page 1127

[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
[Deleted]
Hello, I'm a newbie in MQL4... I managed to code some up and down arrows on my graphs with buy & sell signals... Unfortunately, when it runs live, the signal are wrong because they are calculated "live" while i need them to be calculated on the bar 1 as soon as bar 0 starts. So on the last bar as...
how do I program my ea to place the order on the open of the next bar only.? The tester is opening the order 0.00073 above the open tick... I want it at the open tick. any help if appreciated.
  How to optimise an advisor correctly  (86   1 2 3 4 5 ... 8 9)
It's an interesting question. Everyone has their own experience, please share information how I optimize I select the area let's say 01 01 2007 - 10.09.2007 1. All branches in Expert Advisor, for example, responsible for the visualization and creation of objects on the chart are turned off to speed
[Deleted]
WHY is it when I save a template on MT4 using Windows 7 O/S that the template is locked and cannot be passed/copied? Thanks George
[Deleted]
Hi Pros, When I test the EURUSD history data, there is no error: OrderSend(Symb,OP_BUY,0.2,Ask,2,SL,TP); When I live trading, it always reports error 138. It still opens the order but reduce the lots from 0.2 to 0.12. Could anybody tell me why this is happening? Should I make the...
[Deleted]
Hello everyone! I need the values of MACD calculated like they are in the ZeroLAGMACD indicator "ZeroLAGMACD calculates on formula:" ZeroLAGMACD(i) = (2*EMA(Close, FP, i) - EMA(EMA(Close, FP, i), FP, i)) -(2*EMA(Close, SP, i) - EMA(EMA(Close, SP, i), SP, i)); ZeroLAGMACD Signal(i) = 2*EMA(ZeroLAG...
[Deleted]
Forgive me if this question has been answered 1000 times and I just couldn't find it. However, I want to initiate a download of the MT4 historical and orders reports using only the investor ID, the same way as myfxbook.com or mt4i.com does. I don't want to use any EA based method as I am running...
Hi everyone, I'm trying to run a backtest on an EA (using offline charts), and then call a routine from the deinit() function that will extract certain information about each trade generated in the strategy tester. (On a side note - specically, I am working on getting the drawdown (and run up)...
  2 charts in 1 ?  (2)
Hi, I would like to draw eurusd & gbpusd charts in same chart. It is possible with mt4 ? Tx.
Hi, If anyone need. how can i to know the last open trade status ? void LastOpenTrade_function(int nb) {                      for (int cnt=0;cnt<OrdersTotal()-nb;cnt++) {         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);              if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)...
[Deleted]
why do i get an error when i initialize my stop as double stoploss = .0050;
[Deleted]
i have a strategy but i don't know how encoding it the strategy is open buy position if the price move up then the highest price of the asian session open sell position if the price move down then the lowest price of the asian session the asian session start at 02 am and finish at 07 am please help
[Deleted]
  Ratchet Stop?  (5)
hi Guys, Im not sure if its called a ratchet stop but im looking to do a stop loss that will jump to Break even when 100 pips has been hit and then to 100 when 200 has been hit and to do this up to 5 levels. I have messed around with a couple of ideas and the problem is the SL keeps...
[Deleted]
Hi everyone! How can I get a requote when I am backtesting? And what can I do against it? 2011.08.10 19:31:34 2010.01.12 12:00 EA EURUSD,H4: OrderClose error 138
  i want a script  (2)
hello i want a script who say: if price up of 100 pip, buy position If price down of 100 pip, sell position. it's all if it's possible i take this. thanks
[Deleted]
I'm creating my first scripts. I created an "include" file, that has a function that places an order (int PlaceOrder()), and a script (PlaceBuyOrder()) that calls PlaceOrder() in the included file. It works fine unless I run the script a 2nd time while the "OrderSend()" is still on the screen. The...
[Deleted]
Does MT4 have any portfolio management capabilities, like would it be able to close x% of all open positions in a portfolio with multiple currency pairs with one simple script?
This code works for FX symbols but not index symbols like the UK100. Any ideas what is wrong? int start()  {   if (Period() == PERIOD_H1) {period_no = 1440;}   double hprice=iLow(Symbol(),period_no,0)+iATR(Symbol(),period_no,14,0);    ObjectCreate("highLine",OBJ_HLINE,0,0,hprice);...
[Deleted]
hi i need help with an indicater as per the picture. i need a calculation of the angle of the standard deviation line if possible, or the gradient of the slope might be a better calculation. I have a theory and would appreciate any help possible please...! Gradient A to B line is required....
  current rates  (3)
Do I need to: RefreshRates(); before I do: MarketInfo(symbol, MODE_ASK); My understanding is that RefreshRates() will update Bid and Ask constants, but if you are read them through MarketInfo(), you will receive the newest one and you don't need to use RefreshRates(); So in a nutshell...
[Deleted]
If I had an EA attached to a GBPUSD chart and I want reference the high and low of other instruments 10 periods back (i.e Low[10]) how am I am to do this? Low[10] just gives me low of current symbol and MarketInfo(EURUSD,MODE_LOW) just gives me the low of current bar of EURUSD. I would like to...
What code is required to limit what ASK or BID price my EA can make purchase for. I am looking at PRICE_MODE but dont understand how use the proper syntax. I mnot clear that this is the code that should be used. My goal is to prevent PAIR purchases that are more than a certain price. Thanks in...
Hi, Having a temporary moment of confusion. Lets say I want to sell the same $ amount of EURUSD, EURCHF and EURJPY, lets say $10 000. How do I calculate the lots sizes. I would have thought it's $10 000/Current Price/ Lot size, so for a mini account EURUSD trade: EURUSD = $10 000/ 1.4341/10 000 =...