MQL4 and MetaTrader 4 - page 1130

[Deleted]
Hi I am using this code that time "t" and then works forward to the current candle plus 3 int bar = iBarShift(Symbol(),Period(),t,false);   if(prewBar==0){prewBar = bar;}   if(Close[0]>Open[0]){   for(i=3;i<bar;i++){ I am wondering how I can get it to work backwards, so it starts and candle plus 3...
[Deleted]
Hi, I am tryingto create a trailing stop based on percentage. Is that possible to alter thetrailing stop that comes with the MT4 program, when we right click over theorder? The default on the MT4 is, if you want a custom trailing stop you justtype the figure you need to track the last advance. But I...
[Deleted]
  Switch to MT5?  (5)
I am currently using MT4 and do not have th feeling I am missing anything, except for iPhone/iPad access. However, I have hired a programmer and expect to start developing EA's soon. Because of that I am wondering if I should change to MT5 to make a start on the latest platform. I have made a list...
[Deleted]
Does anyone know how to "force" PlaySound to complete playing its wave file even though there are ticks occuring before the wav file completes? I noticed that every time a tick occurs, the PlaySound function does not complete the wav file and starts over. Very annoying. Here is a sample of the...
What could cause delay in entry price in an EA ? I have an EA that am using instead of it to enter at a specific price stipulated in the EA, it always delay the market price would have moved almost 20 to 40 pips sometimes before its enter. Also I tried to open two live accounts and i  put thesame...
Hi all I am not sure but seems like the code is trying to OrderSelect an already closed order. I am struggling with creating codes I started this simplest code from here so I can understand whats going on a little better. Getting 4108 unknown ticket errors See code below...
[Deleted]
Dear Friend I have one problem to solve. I would make an allarm that play sound when MACD_OSMA indicator (custom indicator with 3 harrays: 2 x moving average of MACD and 1 x OSMA) and ADX_wilder indicator (custom indicator with 8 arrays) make some thing. The problem that I found is that ADX uses 8...
Dear sir before 2 monthes I was register in White Label program in best and bigest company in the world and before 10 days or more, I received my copy of MT4 (from this site http://www.metatrader4.com/ After that I was try yo contact no one answer me, I Sent to them 3 times but no answer I was...
Here is another beginner question. When using MarketInfo() to detect the Point value or the Tick Size of a currency pair I get the same result, e.g. 0.00001 for EURUSD. (I have a 5 decimal broker) but I get 0.00100 for the Point value and 0.00000 for the Tick Size based on the USDJPY currency pair....
hi friends iam trading with simple strategy, 2 ma cross over, i need alerts in alltime frames where it cross over, put ma1: period 3,shift 0 and ma2:period 5,shift 1 and need time GMT: +5.30 on it. plzz modify this 3 things. plzz help me here is the attachment thanks to all #property...
[Deleted]
Do you use a VPS or keep the EA on the client side, My EA is not really time sensitive. It could take a trade up to 5 minutes past the signal and still be fine. I'm not really a conspiracy theoriest but I am not 100% comfortable running my EA from a VPS. That being said, my client side mt4 seems to...
Hi All, I am running a script in contnuous mode using a 'while' loop. int start(){  //initialise for other objects already existing  objectstotal = ObjectsTotal();    while(IsStopped()==False)   {    ...code here   }} This works fine while in one timeframe. At the moment a message box appears...
Monthly numbering of a branch will make it easier to find the necessary information. The address for a locked branch is here . It is strictly forbidden to discuss trading systems and display their results in a thread: the thread should correspond to its name and purpose. All discussions of trading
  Ukraine's Independence Day  (61   1 2 3 4 5 6 7)
Ukraine's Independence Day is coming up. Congratulations to all concerned on the holiday
[Deleted]
  Cosmetic issue  (4)
Beginner's question: I wrote single code to record and export price data (all recorded ticks) into Excel: double Ticks[65530]; // respects Excel rangedatetime Times[65530]; // respects Excel rangeint deinit()  {    int handle;    handle=FileOpen("Ticks.csv",FILE_WRITE|FILE_CSV, "...
Hi, I am new to mql programming. I have a good knowledge in .Net programming language (c#, VB.NET). I read the books of MQL and now trying to implement my knowledge. I am trying to show the result of how may pips involved as a total in trades. Here is my code: int ReturnTotalLots() { int totallots;...
I have an EA that i will like to reset its external variables to the default setting within the EA after a trade is taken, can you advise on how to achieve that? Thanks Iddy
  Paintbar Study  (4)
Dear MQL Community, i am about to port a Tradestation "PAINTBAR" study to metatrader4 and i want that it looks very similar to tradestation. As you know its not possible to paint the body or cloak of a bar to different color from mql. Does someone have any suggestion how i can look like a painted...
[Deleted]
int h = FileOpen(FileName, FILE_CSV|FILE_READ,',');    for (int c=0; !FileIsEnding(h) && c<9999; c++)  {        if (FileIsEnding(h)) break;         ask[c]=         bid[c]=...             }  FileClose(h); Hi all, Assuming I have a CSV file with 2 colums (one with Ask and one with Bid price) for...
  OrderModify  (6)
Hello: I have this in my code: // Returns result and error messages void PrintMessageOrderModify (bool ticket) { int check ; check=GetLastError(); if(ticket>=0) Print("An order has been successfully placed with ticket # ",ticket,"."); // request is completed or order is placed if(ticket<0)
Hi, Newbie here so please be gentle with me! I want an EMA of 50 and a second one of 200, can you kindly confirm how I go about this. When I add Moving averages to the chart I'm not sure just where to add the 50 and 200. For instance, what does 'period' and 'shift' mean. Do I go to 'levels and add
[Deleted]
  Trading Bus  (2)
To me trading is like a bus and trader is a passenger do not ride the bus until it take a direction, once the bus with the right direction will lead you to a profitable destination The direction of the bus can be determine with the help of your trusted indicators, I am using the following Support as...
[Deleted]
I am pursuing my EA that trades between 3 trend lines drawn from a custom indicator. With great helps from this forum, I've managed my EA running but it has a bug getting wrong trend line value. (trendline "red" in particular) My biggest worry is that maybe the problem is the structure of the EA as...
I have googled, but i dont have found any informations how the fiboArcs are calculated. The problem is that MT4 does not give me a getValueByShift() functions for getting the levels at current bar, so i need to calculate them myself. If somebody know the formula or have a code example in whatever...
Noob, here I'm having a heck of a time trying to make an EA trade an indicator on 1 timeframe - while the indicator from another timeframe is in the same direction Seems that no matter what I do it either trades in one direction only, or NO trades Or maybe at best 2 trades and that all, LOL I need...
I have a live account with forex.com, the problem I have is that MarketInfo(" EURUSD ",MODE_ASK) gives 0.0 and Ask looks fine
I use the following MQL code to keep me out of the market when the spread is greater than 1pip (allowing slippage of 3): "MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID)<=1.0" My Question is: why am I still observing my EA take trades when spreads are higher than 4 pips? Can anyone...
  trailing stop issue  (15   1 2)
//trailing stop functionvoid CheckTrailingStop(){double newsl = OrderStopLoss();for(int i=0;i<OrdersTotal();i++){if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;if(OrderMagicNumber()!=exMagic || OrderSymbol()!=Symbol()) continue;if(OrderType()==OP_SELL && OrderSymbol()==Symbol() &&...
[Deleted]
Dear All: I believe this has been asked and answered before. I am new to this forum. Sorry for the "old" question. I have written an EA. Sometimes, it failes to close the open position. My code related to closing are: OrderSelect(0, SELECT_BY_POS);//one and only one open position, so the...