Download MetaTrader 5

MQL4 and MetaTrader 4 - page 685

To post a new topic, please log in or register
i am sorry if this question is totally stupid but i am absolutely new to automated trading. I want to know if its possible to design a EA which places limit orders as mulitple of ATR value added or subtracted from close price of trigger bar of MA crossover?
hi coders, for my trading i mainly use pivot points and support/resist. the pivots are made by an indicator and the support/resist lines are drawn by myself. i only want to look at the charts when price approaches or touches ANY horizontal line. is it possible to program that? or is it necessary...
I am currently trying to pull into an EA the values from a custom indicator. The values that I am pulling into the EA are different than the numbers that are shown on the chart window of the indicator. To make the exercise easier, I decided to resolve the issue with testing my parameters on the...
Is there a font that I must download for the text to be legible in plane English. Otherwise what could the problem be? Any suggestions? // onelevel.mq4 // Ïðåäíàçíà÷åí äëÿ èñïîëüçîâàíèÿ â êà÷åñòâå ïðèìåðà â ó÷åáíèêå MQL4. //-------------------------------------------------------------------- int...
Hi there, For my own purposes I need to write a script that calculates the RSI but I don't want to use the iRSI formula (long story). However, I want to make sure my values match up with the iRSI. However, I cannot figure out what formula iRSI uses. I am using the formula (as best I can tell)...
Hi, why is the indicator calculating the value 4 times every bar??? int start(){   int    counted_bars=IndicatorCounted();   if (counted_bars < 0) return(-1);   if (counted_bars > 0) counted_bars--;   int    pos=Bars-counted_bars;    if( ThisBarTime == Time[0] ) return(0);       else ThisBarTime =...
Hi guys, I have been trying for days now to add a sound alert at the point of the break even is met and every step that the trailing stop moves(after breakeven) I did manage to add a sound but it seem to sound every tick when the ea was on my chart not even in a trade. I have tried to move it...
Hi, I'm really frustrated trying to get this to work and figure I'd break down and ask for some help... I just want this indicator to alert.wav me when a new bar causes the graph to turn from Yellow to Green, or Yellow to Red or Green/Red turns Yellow. Green being bullish, Yellow is ranging, and Red...
How can I change the open time of candles. How can I shift the open time either forward or backwards?
Anyone got a good Fib based EA for MT4?
I can't think why this code would work on JPY pairs but not on the 5 decimal place pairs. Any ideas? The indicator "testwindow" works on both so why doesn't iCustom pick up the value?...
Hello Everyone, I want to calculate if last trade profitable or not. I want to vary Order Size, depending on last operation. For example, if last trade was loss, I want have only half of default lot. If last trade was profitable, I want to trade default lot. What commands show if last trade was...
  TSD RedBack (5)
TSD RedBack
i keep getting OrderModification Error 1 and 130, but the ordermodification works perfectly, can some one help me find out why. my code: double SL_BUY = Low[iLowest(NULL, 0, MODE_LOW, 3, 1)]; //trailing stoploss SL_Min = MarketInfo(Symbol(),Mode_StopLevel)*Point; // minimum stoploss distance if(...
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...
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)...
how to make backtest possible for this code? if(DayOfWeek()==5 && Hour() == EntryHour && Minute()>=EntryMinute)        {                ticket=OrderSend(Symbol(),OP_BUYSTOP ,Lot ,Ask+Distance*Point,SlipPage,Bid-Distance*Point+SL*Point,Ask+Distance*Point+TP*Point,OrdComment,Magic,0...
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...
APeng
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...
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