MQL4 and MetaTrader 4 - page 162

I have problem while writing print function, whenever I tried to print it's does not work, but other functions are working fine alert and Comment. Even simple hello world programs is not working with print function
Hi all, I have an EA I have coded on MT4. I have started backtesting with strategy tester but am getting conflicting results when using the different testing methods. When using the every tick method it loses money but when using open price only it is profitable. Can anyone take a punt at why this
Hi all, This is a pretty basic question...... How do I move the T/P, S/L, B/E or T/S line labels from the left to the right hand end of their respective lines ??? I have been told that there is an MT4 function to do this but I just can't find it. Any help in identifying this function would be
Hello friends Is it possible to determine the lot size and the number of trades through the settings of the MT4 platform
Hello Can you explain me how is calculated the pip value in this indicator please : The indicator is this ATRprojection but I have only the ex4 file so i can't look into the code... Thank you <ex4 file deleted>
im trying to close half an order using the below code but it does nothing
i want to get barshift with optional date, is that possible using iBarshift
Hi, My EA uses grid trading . The problem I'm trying to solve is when AE sets TPs it is no more in control in which order those orders are being closed by a broker. I'm pretty sure there's a way to force those orders to close in a reverse order to one in which they were opened (seen such EA in
Good day, traders. I have a bit of a problem on my MT4 app. My objects and drawings won't delete. I'll delete everything, exit the app and when I open it, they're back and then some. I've tried uninstalling and reinstalling. I've even gone as far as changing brokers and the same thing happens. This
Dear fellow traders, i am will have a programmer create a dashboard with indicators and scanners for MT4. I would like to lease the dashboard on a monthly basis. My question is how can I end someone's access to the dashboard, once his subscription has ended ? kindest regards Peter D
  help fixing code  (5)
i don't know if this is the right place to post this request this indicator doesn't refresh automatically , i have to do it manually and i have to open the indicator and close it again on each bar formation , even simple right click and refresh doesn't work i attached a photo contains a before and
I would like to analyze various cryptocurrencies in MT4 with my indicators and then decide on a trade manually. Unfortunately, the MT4 brokers only offer very few crypto currency pairs. Therefore I would like to export various currencies from my crypto exchange (OHLC+V data in M1 or M5 TF). This
I want to set stoploss closer to open price when the position was opened for more than 120 min: So, I have this: for (int i = 0; i < OrdersTotal(); i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if ( OrderSymbol()==Symbol()) { if (OrderType() == OP_BUY) {...
I am not very familiar with MQL4, I am a Python programmer and I found this script on Google that export all the objects in the chart. I changed it so that it could also be used as an Expert, but the only way I could find it to run, for example, every 30 minutes is a time sleep. Is there a way to
Hello Everyone, I am newbee in as EA developer, I am trying to create an EA which should take only trade per crossover ,,,Unfortunately I am not able to code the EA in such way as required, Its just taking trades all the way ... Pls can some one guide me through this . Orders are executing but EA
  Repeat Trades  (5)
How can I ensure the same trade (using the same magic number) cannot be placed again until the existing one is closed
[Deleted]
This is the code I have SetIndexLabel(1, "MA " + TimeFrame + " First line"); I would like to add a number to the end of the MA line to disgusting it from other MA lines ------------------------------------- 5 (in the example the number 5) I added this code, and it almost works, yet not correct
Hi everyone, I am coding my first EA (so MQL4 newbie, but I have decent experience in VBA) and I need a way to distinguish existing positions (filled orders) from pending (unfilled) orders. I imagine there is a way to do this using one of the parameters of the OrderSelect() function, but the
Hi all. I've been reviewing various EAs on the MT4 marketplace but none seem to do what I am looking for. The EA should calculate the PNL on every tick and always maintain the max PNL value reached, name it MaxPnl. On every new MaxPnl greater than a threshold (e.g. $20 equity or 3 pips) it should
Can't figure out how to debug it. Someone has any idea? //+------------------------------------------------------------------+ //| 8-21EMAs Strategy.mq4 | //| Copyright 2022, MetaQuotes Software Corp. | //|
Hello all I am working on an EA and I noticed when I am using OnDeinit() in my EA , it causes the EA to shutdown by timeout upon manual removal of the EA from chart and sometimes it automatically restarts the Mt4 terminal whereas when I am using the deinit() function in the same EA everything works
is there any one with "1-3 breakout indicator"? please help
This Tiny Piece Of Code Is Meant To Get The Highest Low And The Lowest high on The Chart (I Know The iHighest,iLowest , But The Get The Low And High Of The Candle With Highest High And Lowest Low , What I want Is To get The Highest Low Even If Its Not In The Highest Candle And vice versa) So I
Hello all... I hope you're having a good friday and weekend. I've been working on my EA, and honestly I'm having some problem with opening an order with OrderSend. I have decided to follow the approach of creating the order with 0 and 0 for stoploss and take profit. After that I want to modify the
[Deleted]
Hello I want to extract a decimal value ( for eg: I want to get 0.1234 from 15482.1234). Please advice me how to code it. Thanks and Regds mithetnme
Hello, I am trying to get the EA to create orders when the price moves x pips away from open order price and then use that price level to make the next trade based off that. I am trying to update 'LastPriceBuy' with the price from the newest order and only if price moves x pips away from that new
i am learning mql5 but when i use 'op_buy' or 'ask' it gives me this error . this is the code : int OnInit () { #property OrderSend ( Symbol (),OP_BUY, 0.01 ,Ask); return ( INIT_SUCCEEDED ); } this is the error: 'OP_BUY' - undeclared identifier DEMO8.mq5 12 24 if you can help me id
I am not well verse in mql, recently pickup after got lay off so I tot why not. This is a code I mix and match //+------------------------------------------------------------------+ //| BuyStop105.mq4 | //| Copyright 2021
Hi guys, I have a cyclic indicator where the minimum and maximum values have been set to WindowsPriceMin and WindowsPriceMax. ... double max = WindowPriceMax (0); double min = WindowPriceMin (0); ... The problem occurs when I open the chart because the indicator is not visible while everything is ok