Download MetaTrader 5

MQL4 and MetaTrader 4 - page 913

To post a new topic, please log in or register
int tempFun() { //---- static int temp=10; temp=temp+10; //---- return(temp); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int temp=tempFun(); Print("the temp =",temp);...
Hello, If a trader just run the EA and it detects a trade signal but it is near the end signal where it is less favorable. How to program the EA so that it will not execute the first signal after launching?
  Volume versus contracts (12   1 2)
Maybe this question is silly for some but please bear with me. I know that Volume tick up means that there were more buyers than sellers. Is there any way to find out at least their percentage relation? What is contract in forex? How to understand the expression<<total volume bought and sold of a...
Greetings, Does anyone know where I can find a close all EA script ( open, closed ) orders. Sometimes i have a over 30-40 open orders running and I need a script to execute all Close on those open orders Thank You!
Hi, I am don't know anything about programing. But I was wondering if somebody had in there box a the script that would send an email ( or sms ) Alert when a bar Closes above and below a Simple Moving average indicator ? Thanks tradingkevin
  FAPTurbo (4)
The guys that created FAPTurbo just released their newest brainchild aiCashRobot. You cannot BUY this robot as they are not SELLING it! Instead of releasing the news of their new robot via all the thousands of affiliates out there, they rather embarked on something called referral marketing. This...
  Arrays? (2)
Iclaim to have read theBook [severalChapters severalTimes] & to havebeen reading theForum for some weeks [mostly, very informative/insightful Responses]. MyRequest is: Iset anExternal, then use it to define anArray as Global = theCompiler doesn't like it. What am i not understanding? ... extern...
I am developing an EA and have already programmed a number of tests for entry. When these tests give a Buy or Sell signal, I want to filter the signal through ADX. Here is the code I propose... bool ADX_filter(int type=0){   bool result=false;   double ADXminus = iADX(Symbol(),0,ADX,PRICE_OPEN...
Hello; I'm trading wit this EA, ILAN 1.4. But recently begun to show the next Message Error: "ERROR 0", and when this message arise the system don't let to set new positions. Do somebody knows how to avoid it?.
  error 4060 (3)
I got error 4060 which is Function is not confirmed but trade is OK or sometimes without indicator arrow. The EA makes trades upon arrow pop up but sometimes no arrow but it gets right value from buffer as is seen in Comment and makes trade. Very rarely yes arrow but no trade but shows good...
Hi there, I found out that I'm unable to run my experts before Feb 2008 on some (small) time frames, since the history is missing. On the other hand, it seems like there are many ticks, which makes me wonder whether it contradicts the above?
Could anybody tell me what it is about the code that means the overlaid lines do not exactly follow the WPR line? It isn't a major problem, but it all helps me learn mql4! #property indicator_separate_window#property indicator_maximum 0#property indicator_minimum -100#property indicator_buffers...
I have multiple criteria for a trade signal that can occur with in a certain number of bars from each other. For example, on the hourly time frame, the stocastics show over bought at 1pm and I want to allow 3 more hourly bars to produce the second criteria (say a moving cross over at 4pm) before...
  stoploss help (1)
Hello, Is there a function to check if the stoploss has been triggered. I want to run a script when the order stoploss is executed. Thanks.
hi all as an aide to my learning MQL4, im still trawling through a book by jason perl on demark indicators. he states he uses the 20:00 gmt as the Close, as it is the end of the busyiest session. therefore ....does anyone know if it is possible to set up a 'custom' chart so as to display...
Hi, I know it can be done and I have read all the object-types over and over again with no success. What object-type is to be used if i want to draw a line with a beginning AND an end on-screen? Thanks alot in advance for any help. / McKeen
Hi, If anyone have an idea on how to identify for example: The screen (showing for example 80 bars, using the same zoom-level all of the time) is showing a candlestick chart in a downtrend resulting in the top-left quarter of the screen being blurred by underlaying candles. (Chart-foreground setting...
  NEW EA - NEED ADVICE (11   1 2)
Hi Guys, I have just completed an EA and the result of the back testing looks OK. Can the experienced (EA) traders in this forum please comment/advice on what additional thing I should do before switching the EA on my live account? It is a trend following strategy and the equity curve & report on...
Hi, I created an expert advisor to enter long and I would like to add a condition that I can't find. This is the bold one below: I'm not sure of the rest of the program. Enter long if : - Previous Close > SMA 10 ---- I'm not sure I programmed it well - Current Rsi > 80 ------ I'm not sure I...
i code a script to study OrderSelect() : //+------------------------------------------------------------------+//|                                               test_typeorder.mq4 |//|                       Copyright ?2010, MetaQuotes Software Corp. |//|                                        http...
Hi everybody, I'm in trouble with my EA I 'have just created. It doesn't buy and sell automatically but only works when "ask manually confirmation" is activated. When the signal appears it asks me to buy or sell. Do you think my problem comes from my platform ? Thanks for your help. Joe.
what is SELECT_BY_POS ? it depens on tickets or open time ? Neither ! i code a script : //+------------------------------------------------------------------+//|                                               test_typeorder.mq4 |//|                       Copyright ?2010, MetaQuotes Software Corp....
Is it possible to have a for loop that cycles in intervals as opposed to going through all numbers in a range? For example if I had this loop    double lows[];    for(int i=1000;i>0;i--){      lows[i]=Low[i];} and I wanted to add Low prices for 0, 40,80,120,... up to 1000. How would I go about this?...
Hi, Anyone have some good advice on this problem ? I've made several "good" EAs and they work well on BackTest, actually nearly any piece of cr*p can be optimized for good results when backtested on the same piece of history as the optimization were done. But add another year to the beginning of...
Hi, I need to set up a bool variable that is true when a new bar is started, for instance when the 10.00 AM bar is closed and the 11.00 AM is started. What do you think about this code? bool isNewBar() { static datetime lastbar=0; datetime curbar = Time[0]; if(lastbar!=curbar) {...
Hello, I have here a present for you, ADX Tradeingssystem, indicator with EA programm, the discription how it work you can find on my wepage: http://www.ts-24.net/mql4_ADX_Average_Directional_Movment_Expert_Advisor_EA_Metat.php the webpage is written in german, i hope you can undertand it a bit, i...
The function DayOfWeek() returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time. My broker's (FXopen) server time is GMT. The server opens a new daily bar at GMT 00:00. Eastern Time (New York) is GMT-4. If the forex market officially closes at 5:00 PM on...
  "(OrderType() (1)
While tracking down a program or logic error I encountered this snippet of code that did not originate from me that seems that it is neither valid nor true: "(OrderType() <= OP_SELL)" It is part of 'looping' through an array: isNewBar();  // Go Trading ONLY at the Start of a New Bar!   bool IsTrade...
Does Meta Trader support multiple accounts? I currently have two broker accounts one for long, one for short... can I write a Expert Advisor program that can trade off each? Thanks
  help needed (2)
i want my ea to be closing all the trade s when the equity is greater than accountbalance, but all my efforts are in vain. this how i used ; int start() if(AccountEquity()-AccountBalance()>=my_profit*my_lot)closenow=true; if(closenow==true) { for(cnt=0;cnt<total;cnt++) {...