MQL4 and MetaTrader 4 - page 1655

[Deleted]
Hi brothers ! I need someone help me. I've got a good and simple Indicator but I want to use it as Expert Advisor. I'm cannot program it. It work very well in 15Mn, 30Mn chart with EUR/USD and the best GBP Thank !
Hi All! I would like to ask your help. I have a little problem with the iMACD() indicator. I'm writeing an EA to a 1_minute EURUSD chart. I would like to calculate a value of the MACD(12,26,9) of the previous day from a 1Day_Period timeframe. I tried this formula, which doesnt work well: MyMACD =...
[Deleted]
parameter setting: MaxTrades=2; how many trades will be open, 2nd trade will be a double lot size to the previous open order Pips=10; price difference from the previous open order, Maxtrades must>1 Force_to_Normalacc=true; true——force to normal a/c, 0.01lots will not work;false——0.01lots can work
[Deleted]
Hi, Can anyone tell my how I can take an existing indicator I have and change one ofthe colors to None so that particular line will not show? I would like to change something like: #property indicator_color1 LightSeaGreen #property indicator_color1 None but that doesn't work. I've tried...
I need help with the following. I can give an idea of how the flow of the programshould go, but cannot get the code working. Check currency to make sure that I can trade multiple currencies. Check if the current candle has not changed. If not changed, return 0 if changed, check for open trades...
[Deleted]
I've been searching through the documentation and several forums. Can anyone helpme on this, is there a way to calculate the Average True Range at a set time, say 1am EST? It's been driving me nuts for the past couple of days.I am using iATR(..,...,shift), current shift is set at '0' which is the...
Hi, Can somebody help me to create a simple ea to purchase a buy order if todaysprice touching yesterday high(1 day candle) and to purchased Sell order if todaysprice touching yesterday low(1 day candle). I want to set a 5 pips tp. Thanks inadvance for your kind help
Hello, with next example you can get the High,Low and Closerate of the day. for(i=Bars-2; i>=0; i--) { if(High[i+1] > LastHigh) LastHigh = High[i+1]; if(Low[i+1] < LastLow) LastLow = Low[i+1]; //---- if(TimeDay(Time[i]) != TimeDay(Time[i+1])) { P =...
[Deleted]
I have installed the latest MetaTrader4 from web site. I can run the terminal. exenormally. But when I try to use the object list, it is seem that MetaTrader4 beenlocked. It not response anymore key input. I must use the Win's task manager toclose the metatrader4, and then I run it. If I use the...
If account balance fell below $1000 I would deposit $500 Can I program this in so I can back test it on Strategy Tester?
[Deleted]
I am just starting with MQL so the following could be a programming mistake butI don't think so. My first real EA involves setting BuyStops and Sellstops at channel boundaries.Then on the first bar of each day, adjust the orders if the orders haven't convertedto actual Buy or Sells yet. Because...
[Deleted]
I am trying to limit my orders based on my available equity. Can anyone see what i am doing wrong? *************************************************** //---- input parameters extern bool ShortOnly = true; extern bool BuyOnly = true; extern int TakeProfit = 20; extern int ScaleTradeEntry = 10; extern
Hi, I have recently had a indicator turned into a EA not being a programmer I am onlycapable of reading and understanding some code not writing it. I am looking for some code snipets to do the following so that i can backtest anddecide on the best way forward. at present my EA just runs at a...
  MACD Sample?  (2)
Hello. I have a demo account and I attached MACD Sample to 30min chart and 1minchart of  eurusd pair. I tested with strategy tester and it look likeit should work, but it doesn't. I don't know what I did wrong.......
Using the OrderSend function places a horizontal line at the stop loss and take profit values of thecolor passed in the parameters. Is there a way to modify the shape of the stop loss & take profit arrows? Iwould like to use the two arrow modes listed below, Value = 1 for the higher price& Value =...
Dear sirs, I urge you to include these 2 functions (actually they are events) to the start(), init() and deinit() functions: int OnTakeProfit () returns the order ticket number which just closed by hitting the TakeProfit level. int OnStopLoss () returns the order ticket number which just closed...
[Deleted]
I was wondering if someone out there could help me write an expert advisor to dosome backtesting? I don't really know to much about writing code. I am lookingfor an expert advisor that will trigger a buy or sell if price moves above or belowthe 50 SMA & 100 SMA by more than 10 pips and checks to see...
How to get the price of a symbol?
Hi, I tried the FileWrite function and it works, but it writes only one line...howdo I use it in 'append' mode so the output file can store the complete historyof EA run in backtesting? I'm attaching my code below... handle=FileOpen("Pivots", FILE_CSV|FILE_WRITE, ';'); if(handle>0) { //...
[Deleted]
Since the backtesting table only shows few information that I would like to expandthe table for few more items like MAE, but to do so I need the code that I shouldadd to my expert advisor so when backtesting is done a file with all of the backtestingresuls are saved somewhere. Can someone help...
I need to have this script run continuously run until the conditions are met forthe email to be sent once and the alarm to sound once. I need to enter theRefreshrates(); command in the correct areas in the script so the bid and the indicatorsare updated continuously. Any thoughts???
I would like to program this IF NUMBER OF OPEN TRADES = 8 THEN CLOSE THE OLDEST OPEN TRADE thanks
[Deleted]
I need assistance taking the following pseudo code and making it work in MQL4. I'msure it's simple, but, I just can't bring it together. I have the conditions forestablishing a BO bar. I just need to set things properly for a comparison of themost recent BO bar with future bars and establish a mark...
Anyone have any idea why the publisher is not working. I have it set to auto-updatefor 5 minutes. But it is not updating or sending the file to the ftp server. Isthere anything im doing wrong? any help is much appreciated.
I was wondering if it's possible to create a semi-automatic expert. The way it works is this. I manually execute the trade(s) I want and the expert manages each trade with the coded (pre-set) parameters. This way, I'm in control of the direction and the expert is in control of TP, SL and MM. The...
Hi, is there a way to show my trades online live on my website or some server and automaticallyupdte every 5 minutes just like the competition? Any help would be greatly appreciated. best regards
[Deleted]
HELP ME WITH IDEALS N REWRITTING THIS GREAT INDICATOR PLEASE I WOULD LIKE TO REWRITE THIS WRONGLY CODED INDICATOR AS I WILL LIKE TO USEIT IN MY EXPERT ADVISOR.THE INDICATOR CODE IS WRITTEN BELOW. #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Lime...
[Deleted]
Hy Everybody, I have the following situation: extern double A=1.1; double L, M; L=(Close[1]+Close[0])/2-A; M=(Low[1]+Low[0])/2-A; N= (L+ M)/2; The question: Is there any way to find out next "N" Highest or Lowestvalues since "N" Last Highest or Lowest values(they can happen in anyamount of periods...
hi all, i am a newbie at EA programming and eager to become proficient and a contributingmember. i've read your posts and am most impressed with the comradery here. was wondering if anyone could tell me what i am doing wrong in this line of code: if (PRICE_OPEN==iBands(NULL,0,20,2,0,PRICE_CLOSE...
I have tried to place these lines in the MACD Sample, but always I have mistakes. string symbols = { "GBPUSD", "EURUSD", ... }; // all symbols to trade int pair = -1; string tradeSymbol; // current symbol to trade void start() { pair = (pair + 1) % ArraySize(symbols); tradeSymbol = symbols[pair]; //