Download MetaTrader 5

MQL4 and MetaTrader 4 - page 6

To post a new topic, please log in or register
Why does this code produce a wrong SL sometimes yes sometimes no? OrderSend(_Symbol,OP_SELL,.01,Bid,0,Bid,0,NULL,0,0,clrNONE);
  Adaptive lookback indicators (1251   1 2 3 4 5 ... 125 126)
Of adaptive lookbackThe Adaptive Lookback (period finder) is truly a market-driven indicator used to determine the variable lookback period for many different indicators, instead of a traditional, fixed figure. It is based on the frequency of market swings - the time between swing highs or swing...
Hi, please help how can I write ticks into a CSV file (in MQL4) so that another program (MS VC++)  can use them real-time.  Thanks, jfekete
Hey Guys, Could someone help me out with this indicator.  I have tried to get to alert at NEXT BAR CLOSED but failed...... Thanks in advance Alan
Hi, I have been currently running my EA on a demo account "EURUSD". However, everytime i move from an hour chart to 15 mins or any other. The EA restarts and places additional orders for conditions that have alreay been met in the previous time chart. How can I stop this problem ? Regards, Paramoo
this is more of a  gee whiz type question, but not knowing the answer tends to annoy me..... does anyone know why "EnumToString((ENUM_TIMEFRAMES)Period())" will not work in stop or limit orders.... it will work in market orders.....  yes it's a seemingly minor issue especially when just using...
When we OrderClose a position partially (say you buy at 2 lots but only close for 1 Lot), it will open a new ticket number, but how do we know that ticket number specifically?
Hi, I'm trying to write an arrow when I cross FiboLevel but I can not if(iCustom(Symbol(),PERIOD_CURRENT,"Heiken Ashi",2,1) > iCustom(Symbol(),PERIOD_CURRENT,"Heiken Ashi",3,1) && iCustom(Symbol(),PERIOD_CURRENT,"Heiken Ashi",2,1) < ObjectGetDouble(0,"Fiboo",OBJPROP_FIRSTLEVEL,0)     // Cross Fibo...
Hi, has anybody recognized this 'feature' as well - may as well in mt5 too? Developing a multi-symbol-system I do:       ResetLastError();      int cop1=CopyRates(Sym, PERIOD_M1, 0,3, τRates);      errCheck = StringFormat("%s cpy:%i ArrSz:%i err:%s",Sym,cop1,ArraySize(τRates),_LastError); I now I...
when I see the backtest results, there is a Result panel (see, e.g., https://quivofx.com/wp-content/uploads/2015/02/result.png) that listed all transactions for the backtest. Is there a way to quickly scroll to the relevant portion of the graph? For example, say buy on 2017.05.03 10.30 EURUSD 5 Min,...
Hi guys, So yeah, the question is in the title. I have an indicator which uses IndicatorCounted() to find out how many candles have not yet been calculated since "last time", but when i switch back and forth between two timeframes, IndicatorCounted() is always zero and thus the whole thing gets...
Hi, I have a small problem with the correct placement of a text object. I would like to assign a number above the High of Green Heiken but the result is not optimal. In some assets it's okay and in others no but I do not understand where I'm wrong. ObjectCreate     ("N",OBJ_TEXT,0,Time[8],iCustom(0...
(Just started learning couple days ago,apologies for the sloppy coding) Just wrote an EA which long when  (FastMA2<=SlowMA2&&FastMA1>SlowMA1) and short when (FastMA2>=SlowMA2&&FastMA1<SlowMA1). Only one position at a time. I tried using OrderModify to close the trade just to get used to the...
Hi,  I'm stuck with a problem for days and i have no clue what i made wrong. Please help me if you can.  so under the start() I have the following code: void CalculateCurrencySlopeStrengthMA(int tf, int shift){   int i;   // Get Slope for all symbols and totalize for all currencies      for ( i = 0;...
Dear Coders, I am trying to create a new indicator which plots a histogram based on the following calculation w.r.t the Pivot points, both current and past.     Pivot = ((PreviousHigh + PreviousLow + PreviousClose)/3);    BC = (PreviousHigh + PreviousLow ) / 2;    TC = (Pivot - BC) + Pivot;     if...
Well this is my situation: I speak about two include files: Errors.mqh and CmyClass.mqh both in ..\MQL4\Include\ which I want to compile individually to detect 'grammatical' errors! I created a class CmyClass.mqh which contains the class method: bool CmyClass::sndOrd(..) the mt4 call OrderSend(..) -...
Hi guys, I was hoping someone could help me out. Coding is not a strong point for me but I am trying! I'm experimenting with basket trading and would like to try something out but I'm not sue how to do it. Assuming I have multiple sell orders spaced by x amount. When I reach a certain number of...
Always when I re-start MT4 my toolbars have diappareared as well as my terminal. Whatever i try with profiles, it does not help. Anyone knows what I should do? Thanks.
When I load my FXCM- BT platform none of the toolbars or status bar are displayed. I've tried saving new profile and Templates as well. No cigar. My other platforms all work fine and display everything as set. Ideas? Suggestions? Brilliant solutions? TIA Keith
Hi all! I'm using Tickstory data for back-testing and for some reason I get COMPLETELY different results on build 950 vs newer other versions (build 970 or build 1045) Any idea why? TX
I output the value, Spread should be = ASK - BID MT4 Build 1065
  Various (1121   1 2 3 4 5 ... 112 113)
In case some of you have been wondering what was the "wonder" indicator picture posted a couple of times in the digital filters thread, and, since rules for advanced elite section are a bit different : It was a MACD of a Hodrick-Prescott filter. One version of that indicator (Hodrick-Prescott...
Hello, First of all, i apologize my English skills. anyway, my question is same with title "how to restrict trading times in a day?" i used things such like 'TimeDay(TIme[0]) != TimeDay(Time[1]' and 'OrdersHistoryTotal'. BUT those aren't work very well. if any ideas about restrict trading times,...
  Array and indicators (11   1 2)
Hi guys, I have an indicator, which works with an array (not candle's data, but on-the-fly generated). This array is empty at the first starting. When the indicator runs, this array gets new values. My problem: when I change an input parameter and refresh the indicator on the chart, my array will be...
Hi, I'm trying to figure out if what I've written is correct or not, could I have some help? The variable int O has [13] Array, so is it correct to skip it in the Y loop? Is it correct to insert Array O [Y] into Array Time []? Is also correct to assign to K = O [Y] ;? I apologize for these trivial...
Hi all I am trying to write a script that will give me the OHLC valuesfor the last 3 bars at a certain time  ofthe  day that runs all the time How would write the if condition for the time to trigger in the day  and only when the market it open and print it to the screen. I have seen this and at a...
tonight my windows 10 has been updated: when I reopened it this morning, I noticed that my expert advisor had gone from the tables. when I tried to reattach it, it does... nothing! no error, simply it doesn't attach. I tried all the test experts, dragging them or left-click then selecting "attach to...
I am trying to use a boolean statement within my signal paramenters -  in global variables I have 'USE MA' = True, I need to insert nested if statement, but it keeps running with errors..  In other words I want to add another condition if (and only if) boolean statement on global level is true,...
Hello Ea request Simple Based Expert There are no additional features. I do not want the mix. I want a robot with a strategy in the picture. Thank you. Strategy Picture :
Hello guys i am trying to make a trade bot both with auto and manual trading but for some reason every time i use OOP or even with the new controls i seem to fail so i am asking any body who can help me please for the love of god lol... I want to place 25 buttons on a panel that when clicked change...
12345678910111213...1231