MQL4 and MetaTrader 4 - page 111

Hi, how to change this code to moving average setup? want to add 2-3 EMA with changeable value.. extern string SignalSetting = "---------- Signal Setting ----------" ; extern ENUM_APPLIED_PRICE ApplyTo = PRICE_CLOSE ; extern string Setting_ = "----------- Stochastic -----------" ; extern int Kperiod
Hi MQL community, My EA from time to time executes a trade when my division1 value is greater than 0.50. Is there an obvious error in my code? FYI, I run about 30 EAs in different pairs with similar code, however, they each use a different magic number. Also, I'm getting no error messages in the
Hi, I want to get what candle Bearish/Bullish closed above/below using MA. This is my code, but not works. double ema13 = iMA ( _Symbol , _Period , 13 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); bool bullish1 = Close[ 1 ] > Open[ 1 ] ? true : false ; if ((Close[ 1 ]> ema13)&& (Close[
Hello, I want to backtest My EA on the broker IcMarkets. When I print: Print(iLow(_Symbol,PERIOD_D1,0)); In the Journal of the Strategy Tester, I receive the lowest dayily price, no matter if the day just started and that price is going to be touched only hours later. Seems like this Print gives
Does it mean I should write the code under the event handling function? I'm doing it here, but still error. void OnTick () { double takeProfit = NormalizeDouble ( Point *TakeProfitS, Digits ); double stopLoss = NormalizeDouble ( Point *StopLossS, Digits ); double shortStopLoss = Bid + stopLoss;
Good morning, I need an help to understand how my OANDA demo account works. At 12:28:43 there is a Financing row (-0.19). At the same time a sell stop order is deleted and a buy position was partially closed for the same size of the sell stop order. I am 100% sure my expert didn’t place these
Hello friends, If you did some research on trading bots you might have noticed the steady growing equity curve of most bots with some big spikes inside. I always wondered how most bots turn a profit and found out about the martingale gambling strategy. With martingale you start with a x amount of
Hi, Can I ask some questions regarding MT4? i'm asking this because it's mql5 forum, but i can see mql4 questions here. is it allowed
Hi. is possible to get M and W pattern (check in attachment image)? Regards, Chris
I have a problem when using string arrays. When I drop my EA on GBPUSD it will not open and others pairs. It only opens on the 1st arrays "EURUSD" and " USDJPY ". void BuyTrade() { int Final= 0 ; string Base[]={ "EURUSD" , "GBPUSD" , "AUDUSD" , "NZDUSD" }; for ( int Loop= 0 ;Loop<4;Loop++)
  Pin Bar  (6)
Hi guys, I have a problem with the code. I want to find the Pinbar (1) as in the picture excluding the Pinbar (2). I would say that the length of the shadow must be> = 3 times the length of the Candlestick Body. I wrote this code but it does not work.    ....... myPoint *= 10;...
I don't spend much time in forums so this thread might seem silly but I would liketo know how to find a quality trustworthy programmer. I have not had much luckin this regard so I am assuming there is something I am missing. What type of qualificationsor certification should I be looking for that...
Hello! I believe that this topic has been discussed. Kindly advise where to find the answer. I would like to convert doubles(price) to integers, work with them, and then convert them back to prices before using them in a OrderSend() / OrderModify() functions. I used this functions: int GetPriceToInt
I dont want it be profit for current opened trades (if I type AccountInfoDouble( ACCOUNT_PROFIT ). I want overall daily profit. How can I do that? Comment ( StringFormat ( "Profit = %.2f" ), // what next
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...