MQL4 and MetaTrader 4 - page 1202

I am attempting to write my first EA, and have read the documentation and the MQL4 tutorial book. I believe I understand about minimum stop distances. But try as I might, I'm still getting Error 130 when I submit my orders, and I don't understand why. Here is the code: minDistance =...
[Deleted]
My EA is still under development and I having trouble to simplified 1 of the process. I was watching for 2 Moving Average to cross, SMA 2500 and SMA 3000. After the 2 MA crosses, I would like to trade on the first tick that reach the lowest or the highest MA line which can take quite some time, from...
[Deleted]
Hello, I have written this simple indicator Joe DiNapoli uses to determine Over Bought and Over Sold called DOSC for Detrended oscilator. It is just he diference between Close and Moving Average. The indicator works good and the only buffer that is used is full and does what it needs to do. Then I...
I wrote a robot which performs good only on GBP/USD but fails miserably on all other pairs Is that the way it should be ??
  Enum in mql4 ?  (2)
Is there such a thing like an enum in MQL4? - I want to program my station and don't want to wait until MQL5 becomes available for livetrading. I know one could create a string array of certain size, but using an enum type would be easier.
  Indexed Bars  (1)
Can I assign the Open and Close price of the previous bar like this: Open1=Open[1];Close1=Close[1]; Or should I do it this way: i = Bars - counted_bars - 1; And then use in the form of: Open[i+1];Close[i+1]; Is it the same or not?
How do i delete information from a array file to make room for the most recent information if ??
Is there any documentation on MetaTrader 4 Strategy Tester limitations? I'm optimizing a combination of more than 10496 in the Strategy Tester, does it mean that optimization stop after 10496? What actually happen to the combinations after 10496? Thanks!
Hi, I need an EA that will override the existing Stop Loss in another chart for the with the same currency pairs. Likewise for a Trailing Stop Loss: So that it will override a Trailing Stop Loss &/or Add a Dual Trailing Stop Loss in EAs that don't have one or only have a single Trailing Stop Loss....
1 He i was using this below indicator (no.1) but i am unable to put buy and sell condiation in EA buy when bar is blue and sell when bar is red how to put condiation that in ea 2 also want to know how to change the display style off indicator in shown in picture. want to display like indicator...
Every trader has a certain goal in life, an amount of money if you like, what is your dream expressed in money? Please, no jokes, no trillions and billions of dollars. My strategic goal is 3 million rubles or $100,000
Pay attention to this advisor! It is not a Pips!!! makes a bid either Buy or Sell! only one!!!! On average makes one trade per 1 hour! With a minimum drawdown of $200 it earns $6,000 per ppl! This is not all tested on a period of 1 year from April 2006 to April 2007, it showed stunning results! I
I am new to the forum and recently discovered the excellent code base and custom indicators. Very impressed by the work of others and willingness to share, but as I am completely new to this and have no previous experience in programming, I was wondering what the correct approach is, or etiquette...
I hope someone can help me. What I try to achieve is a conditional line in a graph i.e. for the Stochastics indicator I only want the base line and the signal line to be drawn when they are rising or if the are above 30. How can I do this? Do I need to add an if statement in this part of the code:...
  EMA-possible?  (2)
Hi! I want to compare EMA line between previous bar and now. If previous value ( previous bar ) of EMA is low than actual ( actual bar ), than BUY...somethig like that I wan t to create...is this possible? Thanks
[Deleted]
Dear members I need help with some coding please I would like MT4 to place an auto stop loss order whenI place a trade. The stop loss needs to placed at two points below the low ofthe last bar on a 1min timeframe. Please help. Peter.
I am having an indicator with 5 buffers The first two buffers are lines. The following three buffers are drawing arrows/symbols. SetIndexBuffer(2,BuyBuffer); SetIndexBuffer(3,SellBuffer); SetIndexBuffer(4,ExitBuffer); Now I am writing an EA, which checks when the BuyBuffer, the SellBuffer...
Hi, I am trying to develop a code that identifies the order in which EMA crosses happen. For eg. I have 3 EMA's : 5, 8, & 14. I want to get an alert when EMA5 crosses EMA8 first and then crosses EMA14 (in that order). All these crosses must happen within a specified number of bars, say 5. Rules are...
[Deleted]
Hi folks, This problem is driving me crazy. It started today Sunday morning. Does anybody has same problem? This is the printout, open0 is Open[0], open1 is Open[1], close0 is Close[0], and so on. 2010.11.01 - 18:15:00 - - - *******************New Bar************************************2010.11.01 -...
[Deleted]
  Indicator Color  (5)
I've been trying to find the color for this LSMA so that I can bring that value into my EA with the iCustom function. I've been trying to find which buffer contains the value of the color being painted, but no luck. I've searched this forum and found quite a few others with the same problem, but...
I want to calculate the average price of curreny EUR/USD for the first hour of the trade, mathematically this is achieved as follow: TotalSum = everyTick price Then the TotalSum is divided by the number of Ticks added to each other. How do I implement this into an EA?
hi am traying to make a simple indicator that put a vertical line after a numbr of bars.....example.....i will enter the date and time and the indicator will draw a vertical line after 25 bar my code is as follow.......but need some help to finish it......  ************** this is the last code that...
Hi, I ran into a problem, which is too high for me at the moment. The idea is that if a trade was profitable, no new trade should be opened that day. If the trade was a losing trade, a new trade should be opened (if meets the conditions of course). To solve it, I creared a variable: int Profitable;...
Hello, I am looking for a partner to build an EA. I have a good background in Programming (C++, Java, etc...) and also some experience in trading. The thing is that i don't have a complete trading system..... I am then looking for someone to join me as a partner. We may discuss about concepts &...
[Deleted]
For some forex traders, they have chosen to let the experts do the forex analysis for them. Maybe they have already tried doing the technical and fundamental analysis on their own and realized that they are not really cut for it. So they just rely on the forex experts and listen to their opinions...
[Deleted]
hi there, I have a demo account at instaforex... MT4 only loads the historical datal back to 1999, is it possible to load everything starting with 1970?thx
  A question for MQL connoisseurs  (101   1 2 3 4 5 ... 10 11)
Good day to all! My question is as follows: how can I make an indicator recalculate itself no more often than a certain number of times per second, for example no more than 2 times. The Sleep function does not work in indicators
[Deleted]
Hi all, i have only one problem remaining to be able to finish my EA. I wrote the following code in the beginning of the start function to show me the profit of the last closed Sell trade, the problem is that it brings me the first closed Sell trade profit and remains on that number and never...
  Anyway
Buy on left Sell on right indicator is perfect
[Deleted]
If I put slippage of let's say 10, what does it mean with a 5 digit broker and what does it mean with a 4 digit broker? My guess is that with 5 digit broker, it's a slippage of 0.00001 and with 4 digit, it's 0.0001, but is that really so?