MQL4 and MetaTrader 4 - page 187

To post a new topic, please log in or register
Hello, Can someone share a simple client/server named pipes or other simple solution to exchange data between two metatrader 4 terminals? I tested several scripts. None seem to work.
  refresh tips? (20   1 2)
I created a button that updates the chart and its objects but is just an escamotage, you have less rudimentary suggestions void Bottom (string nome, string text, int text2, int XSIZE, int YSIZE, int XDISTANCE, int YDISTANCE, color colore, color colore2 ){    ObjectCreate    (0,nome,OBJ_BUTTON,0,0...
I would like to create an indicator that sends me notifications when an indicator changes value, should I create an EA, script or indicator?
Besides the 6 basic trade operations as detailed here https://docs.mql4.com/constants/trading, I've noticed that when selecting from the history pool, there are also: type 6 which is a 'balance' line and type 7 which is a 'credit' line. Questions: 1. Where is this documented? I simply can't find it...
hello everyone, I think this maybe an easy problem to solve, but I can't get it to work with out causing an error.    int a=0,i=1;   double test [a][i]; // invalid index value   test[a][i] = 1.35;   Alert(test[a][i]);
Can someone explain to me how relativedrawdown is calculated on mt4 detailed performance? I understandmaximal but not how relative is calculated.
My earlier similar titled post refers. I've distilled the issue down to the following:- bool CPivotManager::_getPendingHighBefore(datetime priorToTime,datetime &timeFound)  {   int total=_highPivots.Total();   bool result=false;   CObjVector<CPivotCandidate>*sortPivotCandidates=new...
Hi, I developed a code to calculate a personal indicator. I apply it to 3 simultaneous pairs, presented in the screen in 3 Windows. I intend to maximize the window where the indicator overcome a thereshold and, later, minimize that window when in no longer ok. Exist a comand to maximize and...
Hey guys I'm trying to make an alert for ichimoku when chikou crosses the cloud, but I got no results. Can someone help me? I have this code atm:  if(AlertType==2 || AlertType==3)      {       if(ExtChikouBuffer[rates_total-1]>ExtSpanBBuffer[rates_total-1] &&...
Hi all, I just realize that in backtest, Example AUDUSD 05-10-2017 iLow(Symbol(),PERIOD_MN1,0) return  0.76248 which is the October LOW but that WILL arrive only the 27-10-2017 !!! and of course you need to start backtest from 1-10-2017 otherwise  iLow(Symbol(),PERIOD_MN1,0)  return 0! Do you have...
Dear All, Goodday.  I am currently using the attached script to open multiple pending orders. It can also be used as market orders, but is it possible for me to specify the slippage? something like "enable maximum deviation" in pips size in mt4 new orders box? Thanks.
I am not being lazy here, I have done several searches on this. I have posted another thread Fibo Mania trying to resolve this issue. I need to get the prices on the fibo lines. Now there have only been a handful of people working with code or putting code on this forum that covers fibo. So the...
Hi all, I have a function that checks the time of day in my EA.  It looks like this: void CheckTime(){   static int reset;      if(Hour()==NewDay && reset==1)   {      TradeTime=True;      reset=0;      }   if(Hour()==CloseDay && reset==0)   {      TradeTime=False;      reset=1;   }} NewDay/CloseDay...
hello, My EA auto buy or sell on Gold terminal. When orderbuy or ordersell is close, the lots is higher lots orderbuy or odrersell . I don't know why Max lots orderbuy or ordersell  EA can create is 0.02. How can i to get a lots (0.04,0.08...) Thanks This is my EA...
HI, I am working on own automatic trading system and I have tested RSI idicator - I would like to change it a bit. In MT4, there is RSI indicator and it has below source: //+------------------------------------------------------------------+//| Relative Strength...
  OrderProfit (3)
Hi Couple of simple questions: 1) Is order profit always in the account currency ? 2) To calculate actual (net) profit = OrderProfit() + OrderCommission() + OrderSwap() ? THANKS Paul
class CPivotManager : public CObject  {   CObjVector<CPivotCandidate>_highPivots;   ...void CPivotManager::Tidy()  {   for(int i=0;i<_highPivots.Total();i++)     {      CPivotCandidate *candidate=_highPivots[i]; <-- Invalid pointer access?      if(candidate.GetIgnore() && candidate...
Hi, Any one can give an example in how to search for different conditions in two time frame at once for example: I want to be alert IF: 1) SAM (10,20) Crossover in H1 Timeframe. 2) Price above SMA 50 In H4 Timeframe. Any suggestion or advice will be highly appreciated
Hi, I'm trying to cycle through all the symbols that are available in MT4. Not just the symbols that are currently displayed in MarketWatch. I use the following (abridged) code: int numSymbols=SymbolsTotal(false); string symbol=SymbolName(PositionIndex,false); double price=MarketInfo(symbol...
Hello everyone, I have been doing some research on  Ichimoko Kinko Hyo trending system. https://www.forexfactory.com/attachment.php/1141519?attachmentid=1141519&d...  Now I am trying to code it so that it will advise me of which way the trend is going. I started this code below My variables...
Hi guys, I've been working on an EA that is supposed to move all positions stop losses to entry, if the last order hit take profit. The EA is restricted to 3 positions. The code below that I've written moves the first position stop loss to entry, but doesn't affect any of the other positions, and I...
Can anybody help me create a Buy Limit/Sell Limit script based on MA and using a hotkey? Such that when price (candle) close above the MA, I will press the hotkey and a pending order (buy limit) is triggered on the MA price. Also, when price (candle) close below the MA and I press the hotkey a...
When I go to backtest a strategy I get errors in the journal. 2017.11.29 00:28:55.856 TestGenerator: unmatched data error (volume limit 1444 at 2017.11.20 01:00 exceeded) Everything I am finding is outdated and does not work. I tried using the period converter script, but when I go to open the chart...
extern int setdayofweek = 0;extern int sethour = 12;extern int lookback_hour = 1;extern double buy_points_buffer = 7.0;extern double sell_points_buffer = 10.0;extern double lots = .3; extern double take_profit_points = 10.0; int ticket = 0;int buy_enable_trade = 1;int sell_enable_trade = 1;int...
  MT4 bug report (12   1 2)
HI, MT4 version is 4.0.0 B509. I've figured it out, this is a bug: if you move mouse and hover on a S/L line in chart, there should be a small popup showing "drag to modify... xxx $ loss....". But if there is any SEPARATE WINDOW indicator, this popup will never show up when mouse hovering there....
Hey guys, im working on a Expert Advisor and need some help. How can i check if a position has been closed by a triggered Stop Loss? Currently i check if positions are open and if not, i want to know if the last position has been successful closed or as said, triggered by Stop Loss. I searched the...
extern int setdayofweek = 0;extern int sethour = 12;extern int lookback_hour = 1;extern double buy_points_buffer = 7.0;extern double sell_points_buffer = 10.0;extern double lots = .3; extern double stop_loss_points = 10.0;extern double take_profit_points = 10.0; int ticket = 0;int buy_enable_trade...
Hi  Kind experts Alain Verleyen,honest_knave Here is an simple (sample) EA by MLADEN from TSD,it is based on (using) one single on chart indicator, "StepMA of rsi adaptive tema 1.1",and working well as suppose to be,taking trades buy/sell on trend change (color change) optional on current bar,1st...
Hi, I need to convert the value of Time[] from datetime to an int variable. Exist a quick way to transform an datetime variable into a int variable in Metatrader 4? If is not possible, at least into double could serve either? Very Thanks for your Help!!  :) 
Hello,   Ihope somebody can help me.   Becausethe Nasdaq moves in $ 0.25 increments, I look for my expert a way to round anumber like 5812.66 to 5812.50 or 5812.45 to 5812.25 etc    Who can give me an exemple how to do this? Thanks!   Hans Blancke