MQL4 and MetaTrader 4 - page 1103

[Deleted]
Below I have some basic questions while learning mql4. Apologize if it is too remedial but I would really appreciate if anyone could help me to understand these questions or at least direct me to the right place, many thanks. 1. difference between "return", "return(0)" & "return(-1)" for example, if...
Hello folks. I think I've finally learned a subtle nuance of moving averages that I was missing before. This is probably not new to anyone but I want to share in case anyone else has the same misconception I did before today. For a very long time I used to assume that if a fast moving average...
[Deleted]
Hi, Can someone please help me figure this out. I am new to programming (three days of C++ training behind me) and I lack the skills and knowledge to figure this out. I have been looking at this code for four days and found where the Fibo is and to make changes to the Zig Zag indicator, but I have...
Hi, I am struggling on how to implement a function into my EA that makes it stop live trading once a certain relative drawdown from the equity high(!) has been reached. So say it has achieved 1000 EUR NetProfit and now a drawdown of 400 Euro happens from that equity high of 1000 EUR, I want to make...
  iTime question  (14   1 2)
Hi if(val1 > 0 && faster > slower) { Print (val1, " val1"); Print (iTime(NULL, 0, 3), " iTime val1"); int a = iTime(NULL, 0, 3); } if(val2 > 0 && faster > slower) { Print (val2, " val2"); Print (iTime(NULL, 0, 3), " iTime val2"); int b =...
I have spent ages tring to find simply indicator. Its (today's open price - today's close price)/today,s open and average of the last 14 days also as a second line previous close price-today's open price or Here is better explanation > > This indicator has two lines. The Public Buying (green line)...
Hi, how can I make the color of my indicator-buffer variable?? Normally I program the color in that way: #property indicator_color1 Aqua Is there any possibility to make the color variable with "extern color ..."??
#include <SymbolsLib.mqh> static int mPeriod[8]={PERIOD_M1,PERIOD_M5,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1,PERIOD_W1,PERIOD_MN1}; int nPeriods=8;string DataSource; int tProcessed;int start() { DataSource = AccountServer(); string symbols[5000]; int nSymbols = SymbolsList(symbols...
[Deleted]
Hello Everybody :) extern int MA_period = 50; If I do a backtest, I want the chosen MA to be drawn at the chart automatically. So, if I chose 20 for the next backtest, I want to have a MA period 20 drawn without changeing the MA settings manually. Is that possible? I know, that I can save templates,...
friends could anyone help me to create a formula to mt4 code. i dont know much about computer language. hope u help me rsi<50 and macd >0 and 4sma>17sma>34ema>50sma to go long rsi<40 and macd<0 and 4sma<17sma<34ema<50sma to go short
I found your EA in the web site. After tweaking the set files I found amazing result in Backtest & Forward test in Demo account with only 100 USD. The main problem is, it opens many orders at a same time which is good while in profit but v. bad when it hits stop loss. Would you please help by Adding...
  History Data Woes  (25   1 2 3)
Im using ATC and have been having serious history data problems for quite some time now. After finally convincing their server admin that theres problems, the answer I get from him is that its a Metaquotes problem. Actually I found that ATCs data (real chart data) is also hosed up. Are the rest of...
  efficiency of EA  (5)
Dear all Does anybody know, if I put most calculation into reference section (i.e. below return() of start() ), the efficiency of EA can be improved or not? (for example, shorter time used during running of backtest) Wing
Dear all If I want to open another order immediately when an order is closed automatically by hitting stop loss or take profit, how to write it? (if the original order is closed manually, I know how to write it, but have no idea if it is closed automatically) Pls help! Wing
do any tools can set pend order by horizontal lines? send it manually in MT4, easy to set a wrong SL,TP thanks
//+------------------------------------------------------------------+//|                                                    Parabolic.mq4 |//|                      Copyright © 2004, MetaQuotes Software Corp. |//|                                       http://www.metaquotes.net/...
Dear all, Please help me on the following issue: When my EA open an OP_BUY order, it will open an OP_SELL_LIMIT order at the same time. When the price reaches certain level, it will open an OP_SELL order to lock up the profit. When everything runs smoothly, it will close all three orders...
[Deleted]
I am new to the EA community. After months of learning and coding, I finished an EA and backtested it, but it only works for EUR/USD 1 min chart, which generates about 70% return from Aug 23, 2011 till today. But I tried it in 1 min chart of GBP/USD with a break-even and 1 min chart of AUD/USD...
For instance, if you do not know how to use this trading robot in real trading, and you do not know what to do with it, you may use it as a tool to assess the performance of the robot in real trading, or to check the profitability of the robot. I have an stp broker - the broker does not look bad and
How does the iClose() function work? In other words when I look on my chart and identify a bar 0, shouldn't this function pick up the value of the close for that particular bar? In putting together an EA, I was able to tie-out bar 1 and bar 2 close values from the iClose() function with the...
I have these results finally after completed optimization based on Drawdown, for a period of 1 year. My question is just so silly, but i cant help asking: what these optimization results tells me? and what now? also, Which pass is true, and which ones are fake? The picture is below, and the htm...
[Deleted]
I'm Trying to find a function that will tell me the setting of the "Positions" choice box in the "Expert Properties" window -- i.e., only long, only short, or long and short. Can anyone help me? Thanks. dennisne
Hello there every1. I'm working on an EA. I am trying to use the zigzag and moving average indicators while i get this error. 2011.10.14 11:53:59 Master EURUSD,M1: invalid integer number as parameter 2 for iSeries function I have checked the perimeters for the ZigZag as well as the Moving Averages...
Hi, how can I add a button on the chart, so when somebody is clicking on it, all open positions would be closed. Can I do that in my ea or do I need an indicator for that?
HI, I have a horizontal line on my chart which is manually positioned. I would like to position a text label next to it in an EA. So far I've tried -- double ypos = ObjectGet("Horizontal Line 35541", OBJPROP_PRICE1); and double ypos = ObjectGet("Horizontal Line 35541", OBJPROP_YDISTANCE); along...
[Deleted]
Good day, I would like to create a curved trend line indicator. It must work like a normal trend line, exept that it must be curved according to a specific equation. It however does not seem possible to do, unless I am mistaken. Any suggestions in this regards will be much appreciated. Best regards
[Deleted]
a same EA performs entirely different on history test at different mt4 platforms.
[Deleted]
  Newbee first question  (12   1 2)
Hello guys, I try the very first code in MQL4book below. https://book.mql4.com/programm/execution The compilation is fine. When I "drag and drop" it to a chart, the window show up and I leave it default: Checking only "Enable Alert" and "Allow import of external experts" Once click ok, the first...
[Deleted]
As you could see from my attached pic, there is no chart(and also no data) from June to September. Data are just downloaded from mt4's historical center, from "MetaQuotes Software Corp." How to solve this problem?