MQL4 and MetaTrader 4 - page 141

[Deleted]
Hi, I have been trying to fix this several times but I just can't find where it's dividing by zero. Can someone be kind enough to look into this??   //+------------------------------------------------------------------+//|                          spiders101.Pro_Bot_EURUSD_m15.EA.V1.mq4...
Hi everyone! I have one problem, in mq4 code, I make indicator, this is Fractal component system. And I use IndicatorCounted() in Start function: int start() { int i=0, j=0; cbars = IndicatorCounted()/25; //cbars = WindowFirstVisibleBar()/25; if(cbars<0) return(-1); if(cbars>0) cbars--;
Hi, I have an EA that is structured like this: The main mq4 is holding an array with 2 class objects called 'Side', one for buy and one for sell. Measuring the execution time of the Side method that contains the logic takes 2microseconds. Measuring the same method from outside the class it takes
Alright, I started a new thread because it's a different topic. My EA uses an indicator to determine a bias toward long or short. When the bias changes it fires the order function. This is the only place that the order function is called in my code. However, I have found that several times the order
Hi all, I'm trying to generate the current open trade type but with the following code but the result is always 0 even when the current trade is a SELL. I've adapted the same function to collect the last (history) type trade and it worked fine. For this function i've changed the OrdersTotal for
Hello, First return 0 and then return 2 int CountTrades() { int icnt, itotal, retval; retval= 0 ; itotal= OrdersTotal (); for (icnt= 0 ;icnt<itotal;icnt++) // for loop { OrderSelect (icnt, SELECT_BY_POS, MODE_TRADES); // check for opened position, symbol & MagicNumber if
Hi, I've recently encountered unexpected results when testing my EA on MT4's Strategy Tester . After a little investigation, I've suspected that OnTick() function does not actually get called on every tick, So I've created a new, very simple 'EA'. The only thing in this EA is this line of code under
Hi, everyone. I am new to MQL and just wrote my first EA as shown below(just a tester).Since I want to record all my open trades information( Open Trades ONLY), I tried using FileWrite Function to record it and export it to CSV.The problem I am having is that, when I run it through Strategy test, it...
  Help in coding  (2)
Hi i want some one help me in this code ... As you know about DST ( Daylight saving time ) and mt4 change it's time I enter my trade by my indicator in a specific time and when the time of mt4 changed the arrow will be late 1 hour according to DST hope that you can understand what i want
Hello, EURUSD, GBPUSD working with BUY STOP OR SELL STOP but in USDJPY not working... My code: gRecoveryZonePriceSell = NormalizeDouble ((Ask/Bid/OrderOpenPrice()- 200 * _Point ), _Digits ); gSellStopTicket = OrderSend ( _Symbol , OP_SELLSTOP, 0.02 , gRecoveryZonePriceSell
void CloseLast() { OrdersTotal ()== 11 ; // 10 trades of 0.05 lots in one direction with distance of 150 and 1 trade of 0.5 lots in opposite direction ( i.e Hedge trade) int total = OrdersTotal (); for ( int i= OrdersTotal ()- 1 ;i>= 0 ; i--) { if ( OrderSelect
Hi all,  All of my custom indicators have suddenly stopped loading in my MT4. When i drag one to the chart or double click the terminal freezes. The Journal tab states the indicator initialized successfully. The in-built indicators work fine though. Another thing is that loading a template with...
Hi, I have used Andrews Pitchfork in MT5 and I like to add Fib extensions outside the channel. When I use the same indicator in MT4, I can't apply the Fib extensions. Does anyone know of a solution? The difference appears to be you can't apply levels in the MT4 version. Thanks
[Deleted]
Hi, I ran strategy optimization for my code. Picked a optimized results and ran the tester with those settings. Expert properties exactly match the optimization settings. But I am getting a different results for the same settings? I have seen this happen before? Is this a bug in Metatrader or is...
Hi everyone, Suppose I have 2 instances of MT4 on my computer from 2 different brokers. I'd like one of them to be a signal provider to the other but am not sure how to go about it, so I have the following questions if anyone could help me: Q1. Is it possible to host both instances on one mql5 VPS
Hi guys! I am trying to create a trading strategy, which follows a simple rule: If Reversal Indicator prints some specific values and we have less than 10 open positions then we open a Sell position. If Reversal Indicator prints these values but we have 10 open positions, then the strategy should
[Deleted]
Hi, I wonderwhy my hotkeys and favorites, which I set in the navigator disappear every nowand then. Pretty annoying. I’m nottalking about a live update. How can Iget them back? Where arethey stored? I couldn’tfind them in the terminal config file in the config directory. Thanx. Forexfan
Hi Playing with swing highs and lows - LL,LL,LL,HL,HL for Swing Low and HH,HH,HH,LH,LH for Swing High. If I drop it on a chart... does what I expected it to do. However, doesn't paint entries in real-time and if I test it through an EA, opens trades at wrong entry points. I suspect the indicator is
Hey everyone I'm new here, and this is my first topic, I will be so glad if someone can help me fixing an issue with Mt4 , It's wont installed on my computer, anytime I'm trying to install it they ask me about " server proxy" I've no idea where I can get it from or how to change it from my computer
Working EA in real time requires the completed history of a given currency or does it work independently of the data downloaded in mt4? Thank you for your answer
Hello, I have problem with multiplier. My code: double getLastOrderTicket() { datetime open = 0 ; double orderLots= 0 ; for ( int i = OrdersTotal () - 1 ; i >= 0 ; i--) { if ( OrderSelect (i, SELECT_BY_POS)) if (OrderSymbol() == Symbol () && OrderMagicNumber()
Hi As a seller, I uploaded the indicator I wrote. Surprisingly, when I download it from the site, it is in the list of experts in Meta Trader. I repeated this with the simplest indicators, that was the result. I already (five months ago) uploaded five indicators and put them up for sale without any
I optimize EA , no result show , later I know ObjectFind() and ObjectGet() functions don't work at optimizing! but in this articles https://www.mql5.com/en/articles/1512 Special Features of Optimization Process Draw objects are not really set The objects are disabled in order to accelerate the
I know showing the text using the ObjectCreat() function is pretty simple , but I cant seems to figure out a way to show the Integer values using the indicator buffer I have seen some Indicators in the market section, where they show the Profit/Loss pips with alongside each arrow that the indicator
hello guys I have an MT4 indicator, but this is giving me the errors in the source code, as I'm not a programmer I don't understand any of this. this and the entire code of the indicator, if anyone knows how to solve these error messages, could you help me? (screenshot of errors is attached)
Machine learning is a powerful tool for not only coming up with new strategies (like we do in TRAIDE) but also for improving your existing strategies. In this article, we’ll cover adjusting your position size using a random forest algorithm and turning your strategy on an off...
Hi, when use OrderClose, always close also if not reach specific price. So must close when reach -/+100 points depends of direction. My code: double ClosePrice = NormalizeDouble (MarketInfo( _Symbol ,MODE_BID)- 100 *MarketInfo( _Symbol ,MODE_POINT),( int )MarketInfo( _Symbol ,MODE_DIGITS));
  withdraw from metatrader 4  (11   1 2)
i have 200 euro on metatrader 4 but i don't know how to withdraw it i am unable to login to metatrader 4, it immediately logs me back out i tried to contact the custommer support on this website but they immediately close my ticket without responding what do I do? How can i withdraw the money or get
Hello, I am attempting to convert a pine script code to mt4 expert advisor but I keep getting this error for my variables. I appreciate any help. Thanks #property copyright "Jacob Mastroianni" #property link "https://www.mql5.com" #property version "1.00" #property strict //--- input
How would I move the terminal to a separate screen? Thank