MQL4 and MetaTrader 4 - page 269

To post a new topic, please log in or register
Hi, I amnew to this forum and have a couple of questions. I don’t know if this has beenasked before, so sorry for possible duplication. I will have difficulties toname the English expressions for the interface since mine is in German. Maybeyou can help. Besides I use MT4. Thesequestions mainly...
Hello, I am new to MetaTrader and have been trying to write my first EA. I've done plenty of programming in the past (Java, php, etc) so I have no issues with that aspect, but I've been really stuggling with things like money management, optimising trade entry and exit. Anyway, to cut a long story...
Hi, I wanted to develop an indicator that when RSI is below 30 on H1 interval I can see blue arrows on other intervals - ex. M5, M15, H1, even H4. But I have a problem - on live data it draws correctly - but when I attach my idicator to the window it doesn't show arrows in some places on H1...
Hi, i have an issue. I add text to my chart and then switch timeframes, come back and the text is gone. How can i make it stay?
Hi guys,   so i'm attempting to create code for a Take Profit on a buy trade. code will be a user function to be called upon when order placement happens. The rules are: Take Profit to be set at the closest institutional level 00 , 20 , 50 , 80 as long as it's more than the Stop Loss ie greater than...
Hi,   I am running a simple grid/martingale EA.  However, on trades that are "old", when the price eventually returns to the levels where they should become profitable, ie the take profit price should give a positive amount, the EA produces a large cash loss.  This loss is proportionately bigger the...
I would like to create a lots list if there are consecutive losses. Example: 1 trial - lot 0.01 - Lost. 21 trial - lot 0.02 - Lost. 26 trial - lot 0.03 - Lost 31 trial - Lot 0.07 - Won Then, since the ea won back to the 1 attempt. Remembering that lots do not follow a multiplication order or...
  Hi guys, how can i fix this?  
  Decrypt (23   1 2 3)
Hi Gurus! Here is the mql example of using of CryptEncode/CryptDecode. Based on that example, let's say: string my_string=ArrayToHex(dst); I'd like to get the original text string ("The quick brown ... ") from my_string. How can I get it? Thank you 
How to revive "Popular" template in the Templates? I somehow removed it.
Hello brothers, I would like to know how to convert a order commission + swap value into PIP and I need to add that PIP value with Open order value... (So i'll get exact open order price value) Thanks in Advance.
Hi Guys,  I have been looking for an EA or inidcator that can plot or display RSI support or resistance... I have been searching and everytime I get the support and resistance for the cadle chart , I was hoping for a similar one as below but for RSI window:    
Hello, I have a problem whereby I am running the standard "MACD Sample" EA in the optimizer but getting different results than when I "Set input parameters" and do a back-test.  Here is some of the background:   1) Environment: MT4 Build 1010, Using MACD Sample EA, Windows 10  2) Spread set to "20"...
How to make the function not to return 0 val when Vol >1 ?? double MTRd() { int i; int n= MathRound((MTRperiod-1)/2); if (Volume[0]<1)  // calculate only when the new bar appears {    double c;    double Ext[];    ArrayResize(Ext,0);                //reset old values    ArrayResize(Ext...
Hi, This is my first post, so welcome everyone!  I'm trying to develop a set of custom indicators based on another custom indicator. The custom indicator I want to use is similar to RSI. What I want to do is to check if RSI is below 30 on H1 timeframe. And if it is I want to draw a blue line/ blue...
Hello to all. I would like to bring up a ball, when the Buffer Histogram purple and  Buffer line are not overlapped. the code written by me no errors. #resource "\\Indicators\\price_speed_and_acceleration.ex4" //--- indicator settings #property indicator_chart_window #property indicator_buffers 1...
I have the MA Croosover alert indicator which will alert when two moving averages cross. It plays an alert sound and sends an email. The indicator works very well, but once the alert has been triggered, it keeps repeating the same alert over and over again. Could someone please help me adjust the...
Hi, I am currently encountering this error when loading my dll coded in C++. What could be the problem?  Thanks. 
Hi,   I want to know how many contracts i can take with my account. If i use :  NormalizeDouble((AccountFreeMargin()/MarketInfo(NULL,MODE_MARGINREQUIRED)),0) the answer is  (int)0.89, so less than 1 contract but i can buy 1 contract . Why ?    Thanks for your answers. 
Hello,   i'm pretty new to programming, i'm studiyng a Renko Expert Advisor, it converts a normal chart in a Renko chart. File is attached, i'm understanding pretty much everything, expect this:   void UpdateChartWindow() {   if(hwnd == 0)   {     hwnd = WindowHandle(sSymbolName, RenkoTimeFrame);...
Hi,  i have two identical instance of MT4 where i run some backtest. Same settings, same historical data. One of them was connected to a broker and the restart without credentials just to allow MT4 to use microlots. Now some strange happens in the MT4 that has been connected just one time: With same...
Is it true that I cannot define e.g. for Comment(..) leading zeros  before the decimal point. As I want to show percent-numbers which range from 1.1% to 999.9% and I want to be able to see mat the chart (with Comment(..)) 001.1% .. 009.9 % .. 022.2 % .. 123.4 % .. 999.9 %. I tried StringFormat(%03...
I've been using an EA of my creation for a few years now and it always worked quite well (at least in terms of doing what was expected of it, results are a different story!).. I've only used it on currencies so far without issues, but recently I tried to apply it to XAUUSD The result is that the EA...
I've created an indicator that will plot horizontal lines on each tick. On each tick, I'd like to find the line that is closest to the current price in order do other things (plot vertical line between those 2 points, know how to do that.) I figured the best way would be to just loop over all chart...
mecman2
I have 3 indicators that i have used for a while, but lately i have tried to automate my trade but discovered that some of the buffers are hidden. Can anyone help to modify it so that it displays its hidden buffers on the data window. I use these 3 indicators for Daily chat trend confirmation. I...
Is this the best way/correct way to code the Exponential Bollinger Bands?? I want to know if my formula is correct. #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 clrSilver #property indicator_color2 clrSilver #property indicator_color3 clrSilver extern int...
Dear Sir,  Please add settings when reach the profit in basket close all orders at a time. Add Input options 1. Basket Close = TRUE & FALSE 2. Basket Close In = AMOUNT & PIPS  2. Basket Target = 10 if Basket Close TRUE means when reach basket profit $10 close all orders immediately. if Basket Close...
  optimization of code (17   1 2)
Hi, I found somewhere there that i way to optimize the code is to use multiple if() instead of &&. So I made changes in my code and stopped working properly. So where is the bug? Plz help This worked slowly but properly void  SLman() {  int type, ticket;    int total = OrdersTotal();      double...
HELLO I NEED HELP, AND ME AN MY FRIEND AND WE HAVE MADE A TRADING SYSTEM FOR MT4, MADE THE TESTING, OPTIMIZATION I WANT TO SEE THAT TAKES MANY HOURS AND DAYS, THERE BEST SOLUTION TO OPTIMIZE IN LESS TIME?
Dear Friends, I'm writing my first EA. Order send is not firing but i am getting  next line alert at every tick. Could you please clarify why this is happening? //+------------------------------------------------------------------+ //|                                                 Lal-First EA.mq4...