MQL4 and MetaTrader 4 - page 1143

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 =
[Deleted]
Hi all, this is my first post, so please bear with me. I have read through about 8 posts which were similair to mine, but nothing to help me unfortunately. I am trying to play around with the expert advice system and have come up with a simple start function as below: int start() { //Open...
[Deleted]
Very new to mt4, Could anyone help me to create a indicator that will trail a vertical line by say 20 candles.
[Deleted]
  Error 130  (5)
Hi I am a newbie and testing my EA, but if I want to set up the takeprofit level to Ask+50*point I get always error code 130. I wrote an ordersend script to test what the problem is: int start() { RefreshRates(); int Ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,2,0,Ask+50*Point); if (Ticket<0)...
I want to write a code is based on if last order profit or lost, how can i do that??
I have an MA cross indicator with buffers to show MA crosses. How can I print a label with the price it crossed at just above the crossing area? Is it a case of adding a 3rd buffer? The current buffers use symbols so I am not show how to add a label there.
This is a Good Auto EA ( MT4 ), if you are a programmer please help ( August 2011 Year ) To Use just change the Trade Time will do . This is a Good Auto EA (MT 4 ), But need to have Some Fine tune, if you are a programmer please help . Trailing stop not working . and journal report : 2011.08.05 17...
Sorry for just posting for some crap like this..i'm currently using divergencewiseman1 that i've downloaded from this site, and i've found that its very useful for my trading even in a small lot. Its actually not a 100% winning trading system i had, but i think its ok since the person had a good
Can anyone tell me if there are limits on OR statements? e.g. I run several possibilities in my close statement but it appears that all of the conditions are not read. Is there precedence? /CLOSE SELL         if ( rsiG > 70 ||AO.1H > 0 || rsiD > 50 || rsiD <  30 && SDO.030M > SDO.130M  )...
Any Idea on how to Open a Chart from a Script, or EA. I would prefer not to use SendMessageA( but will if forced. I would also like to control The Profiles and templates from the script in MT4 not 5
[Deleted]
/*------------------------------------------------------------------+ |                                             fracmap_home         | |                                                 Copyright © 2011 | |                                                                  |...
HI, i try to design a function that read all open posiiton and return the position which are on same levels, and returning all the levels in questions. Example i have a buy at 1.3538 and some time after i take a position sell or buy at 1.3538 +/- spread, and 1 hour after i ask the ea to say if there...
[Deleted]
  MACD Line  (1)
Hey everybody, i am using the MT4 and i was checking the MACD to find out that the MACD line is not constructed, also, the signal line is 9 day SMA instead of EMA. is there a way to add the MACD line or change the Signal line to EMA instead Thank you very much for your help Best Regards,
[Deleted]
When I try to use the scripts in MetaTrader nothing happens. I try to execute them from the list also drag to the chart but nothing happens. I use some to close all orders and to buy and sell, but nothing. I have to activate something to use scripts? Thanks for help me. Cristian
I have created an indicator with several double type variables. The values are based off math calculations of pricing information. I want to be able to create trading situations based on the value of those variables in the indicator I created. Do I have to create a separate indicator for each...
[Deleted]
Hi All, I'm new to the forum and to mql4. Have just tried to create a simple ea that I can use in MetaTrader 4. Got a bit of an issue. I'm using MA and MACD as indicators in the ea. But when I Print the ma and macd values per bar, they are different to what I see on the chart after I run the
[Deleted]
can't connect.....
Can anyone point me to some code that shows how to "grab" candlestik informations and compare two candles on two different currency pair? Here is what is want to do. Let say i have a candle @ 10:00am on the GBPUSD. I want to be able to read the high, low, open & close on that candle at that currency...
[Deleted]
Hello, I like to establish the amount of bars from placing an Order to the actual bar[0]. The following code was an intent to calculate the difference between OrderOpenTime and iTime and convert it back to bars based on the current Period(). The idea was, that OrderOpenTime delivers time in seconds
[Deleted]
hi i am having a difficulty on code this, option 1 : it trade if (Eq == -1) Eq = AccountEquity(); if (AccountEquity()>= (Over*XFactor)+Eq ){ for(int TO=OrdersTotal()-1;TO>=0;TO--) { OrderSelect(TO,SELECT_BY_POS); deleteAgain(); Eq...
hello MT4 community, so i have been involved in developing an EA for 9 months, i have posted a couple of times and have been contacted by a couple of "so called" developers, who basically have taken my concept/EA and run for the hills !!! The Ea is mostly coded - but I am not a programmer and need...
i have taken many orders at a certain time, i need a code to generate the average for all those Pending Orders Price and modify all those orders with that average value with some TakeProfit added to it. i want to implement this in Expert Advisors??....someone please help me...!!!...
I have four EA's running in different, liv accounts. - One of them is routinely removed after a trade. I'll reattach it and it will run until the next trade. - The others are removed from time to time, I see no pattern yet. _ The app doesn't crash and charting and all else seems to continue without
Hi: I am trying to write a strategy that uses a precondition and a current condition to enter a trade. I use a simple trend-following indicator to enter the trade but do not want it to trigger unless the precondition was true. I thought that I could run a loop for the precondition using bar...
[Deleted]
Hello, I'm testing MT and have a question, that the search couldn't answer. I hope somebody here can help me. My question: Is it possible to get a list of order modifications? I need this to get the inital stop loss of a order that was modified a few times. It should work after a restart of MT. If...