MQL4 and MetaTrader 4 - page 132

Hi all :) Making my own EA according to the No Nonsense Forex method. One of the points in that method is to use a trailing stop based on the ATR score at the time of making the order. My own code was taking the current ATR value instead (Timeframe daily). Largely because i couldnt find how to
Hi, I need an advice (how to or a script) to temporarily disable an indicator in mt4 (it makes a bit of a mess on the screen and i would like to do some work on a cleaner 'sheet'). just deinstalling it doesn't do the job as I'm making a lot of customization and i don't want to repeat it every time
int OnInit () { //--- indicator buffers mapping Comment ( StringFormat ( "Equity = %.2f; Balance = %.2f; Free Margin = %.2f" , AccountInfoDouble ( ACCOUNT_EQUITY ), AccountInfoDouble ( ACCOUNT_BALANCE ), AccountInfoDouble ( ACCOUNT_MARGIN_FREE ) ) ); //--- return ( INIT_SUCCEEDED ); } How to
I found the multiple line section in documentation, but didn't understand how to separate functions. Comment ( StringFormat ( "Equity is %.2f" , AccountEquity()));
I am trying to display text on a chart but no luck so far. I will appreciate anysuggestions. The following "Comment" and "ObjectCreate" code compiles okbut do not work? Comment("THIS IS A COMMENT"); if(!ObjectCreate("label_object", OBJ_LABEL, 0, 0, 0)) { Print("error: can't create label_object!...
Hello everyone, I desire to auto scale the width of an histogram buffer according the zoom scale's candle. My problem is it only works when i change the time frame. I want it to be directly after zooming in/out. I have put the function in : OnInit + OnCalculate + OnChartEvent ... but, it doesn't...
I'm new to MQL4, please help with my code. When I place my 2nd order, both Take profit and stop loss are TOO close to price instead of TP= 7, SL=2. What is the problem??? extern double TakeProfit= 5 ; extern double TakeProfit2= 7 ; extern double StopLoss= 2 ; extern double StopLoss2= 2 ; int
  Array error  (2)
Hi everyone! I'm trying to figure out how MQL4 arrays work and I stumbled upon a behavior I don't understand. I want an array to hold some undetermined number of elements so I figure out that I should use SetIndexBuffer to let the platform handle it's size. While I can see the elements printed in
As the title indicates my question is this: Can I make a buy/sell/close button that can trade on multiple instances of the platform instead of doing some copy trading type thing ? Please advise Thanks
I access MT4 through Capital City but I am not able to upload any custom indicators because my directory for this program does not contain MQL4, Expert, or Indicators folders. I am new to this so I hope I have described the problem using the right language. I need to know why these folders are not...
to whom or which section should i contact to inform about signal publication issues
//+------------------------------------------------------------------+ //| BreakevenEA.mq4 | //| Igor Muratov | //| https://www.mql5.com |
Please help with my EA, I would like to buy on the EURUSD & sell on USDJPY (same time) . The problems I encounter are when I place my EA on EURUSD (buy) & sell on the USDJPY (2 or 3 digits) my stop losses & take profits are TOO close to price. On 5 digit (USDCHF & USDCAD) pairs everything works
I have been trying debug this error in my code, but after a 1000 times I still don't know how to fix it. int ticket; int oldTime; int start() { if (oldTime != Time[ 0 ] ) { // first tick of new bar found // do something useful oldTime = Time[ 0 ]; } return ( 0 );
Attached is an EA I coded, which does need a Forex account that allows hedging for it to be useful. Putting it online here for others to use is simply to give something back to this forum and as a way to say thank you. It is a "Trade Manager" type EA, not a trading strategy. It works as follows: For...
Hi, I'm playing around with using the Ichimoku indicator on my EA but have ran into an issue when opening a trade based on the value of the Senkou Span lines. Basically I want to open a Buy order when the price opens inside the kumo cloud, then closes above it. Then I want to open a sell order when
I am trying to use GetDiskSerial.dll in mql4 to get HDD serail num. {*******************************************************}{                                                       }{       Borland Delphi Interface Unit                   }{...
When I place my EA , my objects repaint or vanish and sometimes appear again after sometime. What seems to be the problem? void OnTick () { if ( TimeCurrent ()==Time[ 0 ]) { int s = iLowest ( Symbol () , 0 , MODE_LOW , 75 , 1 + 40 ); ObjectDelete ( 0 , "s" ); ObjectCreate ( 0 , "s"
Hi everyone i wonder it's a way to make an ON_Chart function be enable or disable in Capp dialog class like this example i want when i press no button the yes button doesn't work at all (it's working now) : //+------------------------------------------------------------------+ //|
My ea have the code about this double cci1= iCCI ( Symbol (), 5 ,cciperiod, 0 , 1 ); double cci2= iCCI ( Symbol (), 5 ,cciperiod, 0 , 2 ); Now ,My ea run in 15minute period,The value I tracked is different from the value I saw when loading CCI indicators,Why
[Deleted]
Hi, I would like to ask, whether somebody could refer me to an exising / easy modifiable code. I would find it frequently useful for an custom indicator (and / or his line in the window) to see also the lines of first and second derivatives. In particular, when having a custom indicator X (which...
[Deleted]
  How to install MT4 Indicators?  (149   1 2 3 4 5 ... 14 15)
Here is a little guide on how to get the work done NOTE: An indicator can be of 2 format (extensions), .MQ4 and .EX4. MQ4 is the source code, and EX4 is the compiled version of the code. Step By Step 1) Download/Copy/Save the MQ4/EX4 file into your C:\Program Files\MetaTrader 4\experts\indicators...
Hello friends, Hope you are having a nice day. I want to get the leftover from dividing a double value to another double value: for example: a=b%c while b=8.5, c=3.0 then a=2.5; But it looks that % function only accept integers and no doubles. What is the solution? Thank you in advance
Hi, two weeks ago I found good code for Pullback but I can't found this code any more. If I have EMA, and if is candle bullish, when go back to the EMA or touch or go over EMA then get Alert. How to do this? Thanks
Hi, I am a newbie when it comes to programming in mql4. I have taken an existing indicator, "cci-t3-divergence-indicator" and have tried to modify it to print a coloured histogram rather than a line (such as in CCI woodies). The attached mq4 file compiles with no errors, but when I add it to a
Hi everyone I have an indicator that shows different between in real chart and when backtest. This one is from real chart, and this one is from backtest chart, In the setting menu there's a setting used for higher timeframe. My chart is M15 and the indicator using M60. At first, I thought that
I seldom worked with indicators as far as EA is concerned? All I did was manually past indicators on charts when I need them even while working with EA. This can be tasking when back testing the EA being designed. What exactly is iCustom indicators? Are they different from the indicators we manually
Hello everyone, I'm wrinting an EA which has a strategy which open a lot of pending orders. Before sending the command to open, I'm checking if there is enough money. The problem is when some pending orders are triggered there is not enough money, so the strategy tester delete them and close all the
Hi there, could someone point out what's preventing this simple code to compile? struct ValueStruct { string field1; ValueStruct( string f1) : field1(f1) {}; }; class Complex3ValueStruct { public : ValueStruct mVs; Complex3ValueStruct(ValueStruct& valueStruct) : mVs(valueStruct)