MQL4 and MetaTrader 4 - page 112

To post a new topic, please log in or register
void Test_Run() // Program   {   double CurrBid=SymbolInfoDouble("GOLD",SYMBOL_BID);   double CurrAsk=SymbolInfoDouble("GOLD",SYMBOL_ASK);   if(CurrAsk==BuyAt) buy();   if(CurrBid==SellAt) sell();   else Test_Run();  } Hello everyone, I quickly put this code together to run on my demo account, but I...
I am trying to send a notification when an RSI crosses a trendline on the indicator window, how can I do this? I am trying to test a strategy for a month from now. I want to draw a trend line manually on RSI Indicator window, then add a script or EA to alert me when RSI crosses/ touches that...
Hello guys & gals: - Please is anyone aware of "add-in" or whatever that will enable the chart display graphics to display candles etc. on a 2 (two) minute timeframe? Thank you, Bebbspoke
Comments that do not relate to the "Drawing lines - Max and min -", have been moved into this topic.
I want a code to automatically set the zoom state of my chart to minimum. this is to be included in a EA that depends on this minimum zoom state to work.
Hi All, Title says it all, I would like to have a way of populate the order box and display it. so all I have to do is press "OK" to place the order Steve
Hello guys in the following code "                 for(int i=0; i<limit; i++)                  {                     //---- ma_shift set to 0 because SetIndexShift called abowe                      MediaVeloceBuffer[i]=iMA(NULL,0,MediaVeloceTf5Period,0,MODE_EMA,0,i);...
I am trying to have manual confirmation for the EA by having it open the order window(f9) but it seems like there is no such function call. From what i have found online it seems that manual confirmation has also been removed for quite awhile... So is there any other possibilities of changing the...
  Zoom state/level (14   1 2)
Hello all, This question has been asked a number of times in a number of ways by various people, with a conspicuous absence of answers. So I'll put it clearly in the hopes of getting an answer myself. Consider: In order to set the width of histogram bars in a custom indicator in a separate window,...
  Conversion (1)
How can convert any data type to byte? 
Hello forum, I was looking at the standard MACD.mql4 code using  the MetaEditor, as I try to learn to code by example. It all seemed straight forward  for the calculation of the ExtMacdBuffer, but I am confused as to how "double    ExtSignalBuffer[];" is calculated or is populated by...
  draw circle (1)
Hello , I know how to create an ellipse : ObjectCreate(objname,OBJ_ELLIPSE,window,time1,price1,time2,price2);ObjectSet(objname,OBJPROP_SCALE,scale); But i want  a perfect circle, the plot shape does not change as you zoom in/out, either horizontally or vertically. How to do? Tnx
Goodmorning all.  I'm trying to create a "dynamic" range using ArrayMax/Min - aseach new bar comes in (and assuming some other criteria are met) the range extends in length - to achieve this I have elected to create a variable, the value of which changes upon each new candle (and some other...
Does anyu one have a correlation matrix indicator! Tried coding mine, and its just way offl Thanks so much
Hi folks, Searched but couldn't find the answer ...on my question: Is it possible to extract the RSI data per tick to get all RSI values during a candle period? My goal is e.g. to receive the lowest daily value of the RSI on M5. I can identify the highest/lowest candle itself by PRICE_CLOSE ....but...
clinttaylor91
Hey guys,  Ive come up empty handed after searching the correct way to write my code so that it places pending orders a certain pip distance above the previous bars H n L.  Ive seen similar questions but they weren't resolved and i can't find any documentation in the book about this specifically. I...
On my Pc W7 pro this code runs without problem. On a VPS W2008R2 it causes a "zero divide". Even broker, account different. How would it be possible that "iClose (pair [i], FastUnit, FastNumb-1" return zero? #property copyright "Copyright 2015, JLF"#property link      "https://www.rototo...
does it matter if i use High[0] or iHigh(NULL,0, 0) in EA ? why iHigh is widely-used way?
How i can stop Duplicate Transactions in EA  Please help me  bool OrderIsActive(int ordertype) {   for(int i=0;i<OrdersTotal();i++) {         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);         if (OrderMagicNumber()==MagicNumber && Symbol()==OrderSymbol() && OrderType()==ordertype)...
I've created an EA that works very well in backtesting.  However, I have a different program that I use altogether which I use to signal GREEN/RED.  Green is when I consider the market conditions favourable to go long stocks.  Red is when I go to cash. I would like to incorporate the two systems...
  Error CryptDecode (24   1 2 3)
Hi, just trying the new CryptEncode and CryptDecode functions. Everything is working as expected with CryptEncode. However when using the provided example with a slight modification (converting the char array into a string and back to a char array). I am getting the 4029 error....
Hi all, I have been trading for a while but programming is still very new to me. I have created an excel sheet with mt4's dde sample. I now want to display the excel sheet that i have created on my website, but i need the live updates to run as well. Any suggestions how to do this?
I have created a EA that sends tick data to a custom calculation module in my server and receives the calculation's result. I want to plot this result into the graph from this same EA. How should I approach it? All charting and plotting examples point me to write an indicator but it is not...
Hello All! I am trying to add an indicator from my laptop to the mql5/mql4 web terminal. What steps show I take so that I can use my indicators on the mql4 web terminal. Thank you, Marshon
hi friends i have a problem im using MetaQuotes demo account and i dont how add oil and some of stocks i need ur help 
Hello to everyone, I have a small problem using this code: //--------NewBar------------bool NewBar()  {   static datetime lastbar;   datetime curbar=Time[0];   if(lastbar!=curbar)     {      lastbar=curbar;      return (true);     }   else{return(false);}}//--------NewBar------------ that helps me...
I spend a lot of time marking up my charts. Occasionally my computer will crash or mt4 will close unexpectedly and the next time i load mt4 either all my chart markings are gone (back to initial settings) or a previous saved copy of my work will be there (from the last time mt4 was closed normally)....
  Is the File Name Wrong? (15   1 2)
When open a file, get the error "5002". Use "Print()" the file name,  got "C:\Users\900077605\AppData\Roaming\MetaQuotes\Terminal\3222703EF955C10T7523LJHO8922D2\Info.csv" Could you please help tell what is the name problem? Thanks! 
Hi all, I've noticed a number of posts on this but no definitive answer to the questions about adding symbols to MT4. I am motivated by the need/want to integrate all my technical analysis into MT4 (stocks and forex). Naturally I have forex data and symbols from my broker but would like to add end...
Hi there,  I am busy creating an EA that uses 55 EMA and the price close. It must perform some action when price closes above/below EMA 55. I have tested this and it sometime behaves in an unexpected manner. I am not sure if it is my code or there's just a bug in iMA function itself. The specific...