MQL4 and MetaTrader 4 - page 138

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
Trying to place an arrow/text if there is three consecutive bearish or bullish candles formed. Tried a couple of options, but unable to handle Arrow's position. Either too many arrows got painted or the location was at the wrong place. Also tried place text but no luck. #property copyright ""
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
Hi. when I try to compile my ea ,I have the "unknown resource type" error. I use the code bellow in my EA: #resource "\\Indicators\\ForexTrend_TSL.ex4" I have this problem with the " ForexTrend_TSL "indicator. But other indicators are ok. I send this indicator too. I appreciate if someone test this
Hello I have the code below. I get a crossover from an indicator and open 1 order at a time. I want to also close the order when the indicator reaches the overbought or oversold area, (>50) but after it does so it opens and close Many orders. Can anyone help? void OnTick () { string signal= "" ;
  Please help  (2)
I had tried to write the ATR trailing stop EA code (MQL4) from "Orchard Forex" as below. Compiling the code was passing, but I could not run this EA actually. Please anyone make comments where are the possible mistake. input int InpATRPeriods = 10 ; // ATR Periods input double
Hello everyone, My EA is only opening SELL positions. I have the similar coding layout on my other EAs as well but haven't been able to figure out what's wrong with this particular one, since i don't see any error messages. Strategy Tester shows also no BUY positions being opened. The code is as
Hi My expert have problem when i test on strategy tester Horizontal line moving but on live chart not move i want moving like strategy tester , please can you fix that thanks