Download MetaTrader 5

MQL4 and MetaTrader 4 - page 308

To post a new topic, please log in or register
int init()  {//----         ticketOpp=-1;        if (Point == 0.00001 || Point == 0.001)           pip = Point*10;           else pip = Point;   if (Digits==3 || Digits==5) slipFactor=10; else slipFactor=1;//----...
Hi, Does anybody knows if there is a feature in MT4 that show the trades made in live trading on the chart as in backtesting (blue line for long position between the buy and the close and red line for short position) ? Or do I have to program it myself in the EA by creating for each trade an object...
I need a code that allow's  me to open only one order per hour on a single symbol.  this is the  sell condition  if(Close[1] > Open[1])   {double S=MathAbs(High[0]-Close[1]); double Sp=S/Point; if(Sp>=20)result=OrderSend(Symbol() , OP_SELL , lot , Bid , Slippage , Bid+SL*Point , Bid-TP*Point, ""...
Hi, I am new to developing OOP in MQL4 (not to OOP :) ) and run into the following when testing this base: class BaseObject  {    public:      virtual string ToString()      {         return TypeName();      }      virtual string TypeName()      {         return typename(this);      } }; class...
Hi, ChartSync indicator is supposed todo this: Objectsdrawn on one chart automatically appear on other charts of the same symbol.This allows multi time-frame marking up of charts simultaneously, without havingto manually save and load templates. Example If 3EURUSD charts are open H1, M15 and M5. If...
APeng
Hello, I export the balance during optimization: if(   IsOptimization() == true   && AccountBalance() != AccountBalance_old  )   {     AccountBalance_old = AccountBalance();     int handle = FileOpen("Optimization Balance.csv",FILE_WRITE|FILE_READ|FILE_CSV);     FileWrite(handle,"Balance");...
I use a verion of Metatrager 4 build 670 from IG. Everything works fine, but sometimes I have many trouble with setting of colors in the chart. If I will change the color of the bars or rectangles or Fibonacci retracements or other i can not change the color. I get the set of colors but I can not...
Hi all, Anyone here familiar with a broker that allows 0.001 starting lots so i can make my testing on such system? I've Googled for such brokers, and found some that claim to support mt4 and 0.001 lots, but when i install Mt4 it actually 0.01 minimum lot.
Hi, has any body experience with s.th. mt4 does not like to talk about - there are some discrepancies. In the MQL4 Reference I read under long Volume[]: and long Volume[]Series array that contains tick volumes of each bar of the current chart.....      last_fpos =...
I got Buy Sell Pressure Indicator form some where and it's a AFL Code. I try to code in MQ4 but it's not work. Anyone help me to code this indicator. _SECTION_BEGIN("Buy & Sell Pressure - Smoothed with Histogram - V.1.0");SetChartOptions(0,chartShowArrows|chartShowDates);sp = H-C;bp = C-L;bpavg =...
Hello, I would like to check if my last three closed sell or buy trades were profitable, and change a string value depending on it. I have this code (MT4): for(int i=(OrdersHistoryTotal()-1);i>=0;i--); {   OrderSelect(i, SELECT_BY_POS,MODE_HISTORY);   if(OrderSymbol()==Symbol() &&...
Friends, I have developed an EA, wherein the buy/sell order will be placed on meeting a condition in EA. But when I run my EA in strategy tester of MT4, on some days this EA is not placing order even though the condition is met on those days during back testing. On other days EA is placing...
hey guys this is for the first time i am trying to write my own EA and i am little bit successful in it but when i try to run any EA in my strategy tester it gives no result at all not even single trade. This is what my journals tell can any one help
Hi everybody, I experience some frustration in such a way that I want to draw some horizontal lines, computed according to a certain algorithm in two different charts, eg. eurusd and dax. I managed to format the lines as I want (style, color, thickness), but I'm not able to make my EA to move the...
I have read lots of information stating that back testing on generated offline renko charts is unreliable, however looking at the visual back tests it seems as though the tests are reliable when the EA does not use a fixed stop loss or take profit but rather opens and closes trades based on open...
Hello everyone, I'll post a little program that I've done: The program should report me 2 of the stochastic crosses that occur sussessivamente inclusion of 'AE in the graph instead of as soon as I insert the graphic print "DrawAllert (" cross 2 Time = "+ TimeToStr (curtime (), TIME_DATE) +" "+...
I do not know if this is right thread but  I want to suggest two things for both Metatrader 4 and Metatrader 5 1. Volume (CTRL +L)  to show buying and selling volume  and to be colored (MT4 and MT5) and Tick Volume ( MT5) 2. HLC price representation on chart. So far there are only Bars, Candles and...
The order of my charts is not saving once I adjust the order of the tabs. Everytime I adjust the tabs and save; with new profile, running as admin, creating new terminal.ini file... nothing fixes. Is there a trick or file I can edit to change the order of my charts ? 
Hi, The Doc. of mt4 tells me: int  OrdersHistoryTotal();  Returned value:    The number of closed orders in the account history loaded into the terminal.    The history list size depends on the current settings of the "Account history" tab of the terminal. But if there is a new account there won't...
I did see the signals tab on my MT4 terminal and investigated - found many interesting signals! I tried to subscribe but without success. Then I looked for a signal provider that is the same as my broker " TradeFort" - again no success! (I am able to subscribe but no trades are copied as the...
Using MetaEditor v 5.00 build 934 and MetaTrader 4.00 build 670 produces the following: double d1=20/1200*600;double d2=600*20/1200;Print("d1=",d1," d2=",d2); // d1=0.0 d2=10.0  
how can  I calculate a 20 day price channel in mt4? I need it for my calculations, how can I find the current value of the upper line of a price channel for a given bar? I couldnt find any built in functions in mt4. Do you know any?
what is the nearest channel to keltner channels which is built in into mt4 platform? Donchian channel? are there any keltner channels built into this mt4?
Does anyone know how to set an alarm in Metatrader 4 informing me that there was a big fluctuation on the market?  
Hello guys. I am writing from Argentina I hope you will understand my bad English.   My question is :  It is possible select a chart automatically?   This is my case:  I have an "alert line" that make a noise when the price touches it. But usually I use this alert line not only in a single chart but...
Hello Is there a way to label an indicator line (ex. a Moving Average) in the same way that graphical objects placed on a chart can be labelled? What I want to do is detect if an object/indicator with a specific label exists on the chart and read its value programmatically. I can already do this...
Hello guys!   Need some help! When using script Profit = OrderProfit() + OrderCommission(); Comment(Profit);  sometimes getting values like 2.100000000000001 or 2.599999999999999 instead of 2.1 and 2.6. Basically I'm expecting to get max only 2 decimal places after point. Even if I...
Hi everybody, I intend to buy the new SURFACE PRO 3 which runs on WINDOWS 8.1 Pro. Does anyone know or has any experience with MT4 with it ? Thanks for your comments. Sam
When I load my EA to practice account the journal has this line item 2014.08.25 17:26:01.212    Code Base: failed parse codes I can not figure out what this means. Please advise Thanks
Hi, I'm new. I'm looking for someone to code me a robot that will open trades and close trades based on Heikin Ashi Smooth colour changes on renko charts. I'm a university student so I won't have much time to monitor trades. The idea for the robot is basically when heiking ashi candle turns white...