Download MetaTrader 5

MQL4 and MetaTrader 4 - page 435

To post a new topic, please log in or register
im try learn :) Im add extern int Distance = 100; and now work fine distance but take profit / stop loss not work
I want create 3 OBJ_TEXT on 3 lines from lower right corner of sub window. Without text overlap,when zoom in sub window. (not use OBJ_LEBEL) Thank you
  objectdelete (9)
hi, i have indicator candlestick pattern, and it works ok with my modifications about some patterns in it. problem is when changing TF it delete text i entered on chart. not label text. i know this is because of this code : ObjectsDeleteAll(0, OBJ_TEXT); when i put this code -...
  Is that bug? (2)
int start()  {   int    counted_bars=IndicatorCounted();   //----   double factor;   int x1=60,x2=125;   factor=x1/x2;   //factor=0.12345;   Comment(x1,"/",x2,"= ",DoubleToStr(factor,4));//----   return(0);  }//+------------------------------------------------------------------+ I have a simply code...
when i start mt4 and open a new chart it sais \\profiles\default\chart01.chr was not found. i have tried re installing mt4, making a new account, switching profiles. I have just recently moved to a new computer, everything was working fine on old computer.
Hi, I made a script to open trades of 2 symbols. When I test it in the Navigator, it seems that Navigator supports just scripts for 1 symbol. Can someone confirm this limitation ? Thanks
Can anyone pls advise I am trying to run this basic short MQL program to read/write to external file and have reduced errors but can't get further. Can anyone help in debugging this? //+------------------------------------------------------------------+//|...
Does anyone know any EA or SCRIPT which will calculate the TP and SL levels by itself and closes the orders when either the SL calculated or TP calculated would be hit.Before you ask, this would be to get around STOPLEVEL and to allow me to trade little position sizes. To understand it better it...
#property copyright "mankin"#property link      ""#property indicator_separate_window#property indicator_minimum 0#property indicator_maximum 1#property indicator_color1 Blue#property indicator_buffers 1extern int Number=30;double Line_Buffer[], Mean_Buffer[],...
#property copyright "mankin"#property link      ""#property indicator_separate_window#property indicator_minimum 0#property indicator_maximum 1#property indicator_color1 Blue#property indicator_buffers 1extern int Number=30;double Line_Buffer[], Mean_Buffer[],...
Dear all, May I know where to get the document on the outputs in the chart during strategy backtest? for example, I want to know the meaning of the graphical objects in the attached image... Many thanks for your time and consideration, and Merry Christmas to you nice gentlemen, for your proficiency...
So I want to move my stop to break even when my trade hits the pivot line However it seems doesn't work. Any suggestions ? Thanks in advance. extern int magic           = 20051016; //magic numberint start()  {//+------------------------------------------------------------------+//| getting the...
// If the price is greater than OrderOpenPrice() and it comes back to OrderOpenPrice() then OrderClose().// Advise, SampleCode is appreciated.
hello, can any one code for me its very simple but i dont know how to create it... THE LOGIC IS : 1) INDICATOR WORKS FOR FIRST ONE HOUR AFTER MARKET OPEN. 2) SET ALERT WHEN PRCIE NOT TOUCH IN ONE HOUR BETWEEN PIVOT POINT AND SUPPORT-1.........AND ........PIVOT POINT AND RESISTANCE-1 IF PRICE TOUCH...
I am trying to make an EA with a moving average crossover. The code fails after the first cross. If you get a opposite cross, you dont get the signal. Do someone has some tips where the error is? EMA1=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,0);EMA2=iMA(NULL,0,20,0,MODE_EMA,PRICE_CLOSE...
Hi guys, thanks for actively responding my first question, much appreciated. Here is my second question of the my first day. I have a function called "double removeDuplicatedOrder()" return a double Array, which contains a list of pending order price in double. The "removeDuplicatedOrder()" will be...
Hello Experts, I have a strange one. I call several custom indicators at the beginning of a new candle inside of an EA. While running this in backtest I see that one of the indicators keeps getting loaded at each new candle (each time it is encountered in the code). I stop the EA (in Backtest), I...
Can anyone advise? Am trying ot read an external file which I have placed in the C:/Program Files/MetaTrader 4/experts/files folder. However the erro message on the compiler says number 4 invalid number and refers to the number 4 of the MetaTrader 4 sub-folder. How can this be overcome as I must not...
I've easilly seen guides on how to make expert advisors on the web and in forums,... How hard is it to make indicators and use it to do a statistical or seudo backtest? Just wondering about the theory behind making indicators and I can't seem to find anything to deliver that.
Hello, maybe someone knows how to insert and what kind of code to insert to my EA so it would be able to open trades with 50% of current balance? for example: I attach my ea, when conditions are good it opens trade with some lot size which will be a half of my current balance, than if it losses it...
  Recent HST format changes (14   1 2)
I have been writing a HST file reader, that I have confirmed to work with an older HST file ( originating from an older version of MT4 ). But since LiveUpdate updated my MT4 build to 225, I don't seem to be able to read the header properly, and not any of the RateInfo. I have quoted the docs on this...
I am a new comer here. According to my knowledge, foreign exchange from customer to market through stock brokers,the buy and bid price are often using fixed gap, usually 2 points. But foreign exchange from customer to market directly through ECN, ,the buy and bid price are often using floating gap....
I had created an EA, which sends e mail, when a cross and close happens. My SMTP server is smtp.com:2525. The problem is, the mail gets send (even test mails) some times and sometimes not. Though GetLatError() returns 0, the error pops up in the journal. The latest one was Mail:Error connecting...
Hey guys, I was wondering if someone can help me with a the coding here. I want to place Max orders. I am going to place 4 pending orders a day and after those trades are placed I want the next 4 orders to be placed the next day. I tought of counting the trades by selecting the trades if they had...
Test Period: 1 years; Spread: 10; Result as below pictures: This EA is made just now, I think there must be many deficient points, so I post its result pictures here to get advice for this EA's serious deficiency.
I made an Indicator which can draw a line on chart as below; some time this line cross the bars around it and some time this line always run above / below bars as below: the first situation: the second situation: So I want to get a good method of differing these two situations.
While testing, There are two or more opened sell or buy orders. Im trying to modifying orders but it does not work. I debugged and found it responses none of orders opened filtered by if(!OrderType() == OP_BUY) continue;... Why? <CODE REMOVED>
Hi, I wonder how I can specify an alert at a specific time in the day or an alert after a daily close. Can someone help me with that? The problem I think is that the functions hour(), minutes() can not be used because it only works when the script/ea loads. I am going to use it in an EA.
Hello, I am new here so others might have asked this question before but I can't find any from the search box. All I am looking for is something like the picture below. Lines are automatically drawn. It is like drawing a trend line where when it is going down, a line is drawn at the top and vice...
Hello, does somebody know what the error mean "no memory for string" i did see that today in my experts tabs?