MQL4 and MetaTrader 4 - page 292

having issue with a function that will calculate total profit. this is what i have so far. thanks for any help int BuyProfit (){   static int TotalBuyProfit = 0;   for(int iPos= OrdersTotal()-1; iPos >= 0; --iPos)   if(OrderSelect(iPos, SELECT_BY_POS)   && OrderMagicNumber() == MagicNumber   &&...
[Deleted]
Is there a way to stop a script that is frozen or stuck in a loop, etc?
  Getting error:0  (3)
Hi. I'm testing this ea on demo, but I'm frequently getting the "Error: 0". And when this error shows up, the orders failed to open. I've been searching for solutions, but still can't figure out. Any suggestion? Thanks How to get open order by this bot
Hi , I need Some Help This indicator is Called TCCI and it's Using iMA Function , the Problem is when i want to add UpWard Or DownWard Arrows To it , it Show's Continuing Arrows! ( For Example the Shows DownWard Arrow in Every Candle until the Signal Changes To Upward ) i want it to show arrows only
The above code prints 3210. Is the order somewhere documented? Is it always right to left
I was wondering if anyone can help me with a small issue, I have an EA that closes basket of trades once a certain profit is reached. For example this past week there was a basket of 27 open buys/sells that took 7 seconds to close, in the mean time price had moved 2-3 pips and it ended up as a
Hello, m8 I created my own EA. My EA will open orders twice per signal. And they should close with trailing stop.... When I did backtesting, they opened at the same time.. However, when they closed orders.. they did not close at the same time.. only first-order closed properly.. but the second one
This script creates a Horizontal line object that actually shows on the chart. If I display the Objects List, the object name is included in the list. However when I loop through ObjectsTotal() the object name does not Print. In addition, ObjectFind() also fails to locate the object. Any ideas to
hi every one i have a custom indicator that create some object graphic but after i delete the indicator they are still there( one button ans some label) i use this code in my indicator: void OnDeinit ( const int reason) { for ( int i= ObjectsTotal ( 0 ,- 1 ,- 1 ); i>= 0 ; i--) {
  Error 130  (4)
Hi, I am getting error 130. I read many articles regarding the same. But couldn't fix the error. because the same code is working with some input and not with some other. I am using NormalizeDouble function for Tradeprice, SL and TP. Pls help me with it. 2020.06.29 14:13:01.637 2020.06.02 04:30:00
Dear all, My limiting knowledge of programming is giving me a hard time with the piece of code below: void OnTick () { double PriceDiff = MarketInfo( "AUDCAD" ,(MODE_ASK)); int fileHandle2 = FileOpen ( "Myfile.bin" , FILE_BIN | FILE_READ | FILE_WRITE ); FileSeek (fileHandle2, 0
Thank you for your time requesting assistance please, my FIB. retracement tool will not stay on my MT4 if I draw my FIB. retracement tool on any timeframe then switch to another timeframe it disappears, the FIB will not stay on my chart after I switch to another timeframe or log out of my MT4. Any
Hi, need some help I have converted an Indicator to EA, but it still seems to think that it is an Indicator. "no indicator window property is defined, indicator_chart_window is applied 0 0" I have gone through the coding and everything looks good, except I think it might be due to the Buffer, which
Is there any builtin function of mql4 that can read the text label ( IndexLabel ) of the selected indicator buffer
Hello guys I am trying to run optimisation on MT4 with differents EA's but each time i get not results and this message: 2020.06.27 21:06:03.542 There were 2 passes done during optimization, 2 results have been discarded as insignificant Is there a third party software that can run various
HI All, I want to create one Robo-trading software. In NSE segment it is not allowed to do directly auto-trading via MT4 in India. So I want to create a robo trading software. How it will work : - I have to feed NSE Data to MT4. I have to create Customized Indicator (as per my strategy). Then I have
Hi, please help. (I am self-taught) I can't figure out why it's a mistake. EA buys or sells according to the last candle opean <closed or opean> closed When the loss is closed, the EA multiplies the next position until it closes on the TP. Please help. Error: 'selectOurOrder' - function not defined
Hi. I was using Stylo S55 for MT4 n I changed to P40. So every time I try to install MT4 on d P40 it recognizes d P40 as d Stylo S55 n therefore can't in stall. Please help
Hello, I am new to coding and to this forum and am seeking help with the below code: Trying to trouble shoot what i did wrong I am receiving the error 'int' - semicolon expected Any ideas would be very helpful thank you void OnStart () int dayoftheweek = DayOfWeek(); bool dayoftheweek() {
hello I have this indicator which I have modified a couple of things but I can't figure out how to finish it, this indicator has a schedule where it creates a rectangle from high - PRICEHIGH from 14 - 23 hours and I need how to make this part of the indicator work from 15-23 this part of the code
Hi, how can i solve that i get Ordersend error 134. When i use strategy tester and acccount balance is 10dollar so i get ordersend error 134. But here the ea have to check money before ordersend. So i have checked that with that function bool CheckMoneyForTrade(string symb, double lots,int...
Hi, I need some help fixing my optimizer so I can resume the optimization of my EA. My optimization results are useless because they are showing me trillions of dollars and insane profit factors. The actual backtest results for the parameters are completely different. Sometimes even negative. There
I am writing an MQL4 EA that I am frequently optimizing. Recently, the number of combinations are increasing exponentially. Soon my 16GB of RAM will no longer be sufficient, unless I want to wait months to optimize. I know MT5 has cloud CPU solutions, but I can't find anything for MT4. Can anyone
I have a large EA that works wonderfully on EURUSD 1 minute in virtual, in Mql4. My problem is that as soon as I get into reality, he loses money. I turned in all directions and I cannot correct the error. I think it should be fairly easy to fix. Thank you in advance for your help
Hey Guys i Just Tried To Cconvert an indicator From PineScript to Mql4 and i made this indicator but now i want to add some sideways market filter to it for more accurate signals i found some indicators called " Slope Direction " is there any way to tell this signal indicator to " Do Not Show Signal
Hi everyone, I'm new here, also this is my first day using MQL4. Is there a way to use MarketInfo MODE_STOPLEVEL to be the actual value of the min stop loss and take profit in the input and aftwards change the value based on user's input
There is no way to get to the point. I need to send orders asynchronously, I mean, I can't wait for a reply to be sent, to send another one, because I have more than one order to send at the same time (for two different pairs). How to send orders asynchronously with MQL4? Thanks
Hi Everyone. I have been using an indicator lately that I really like. Essentially the indicator Tracks Price Action and Volume and notifies you of trend changes. The only problem that I have is with the alerts. When it alerts you of a trend it literally states: "New Signal Current Trend Up" or "New
[Deleted]
Hello there, i have a question: Maybe you know the super trend indicator. I want to use it for my StopLoss. But somehow this is crazy: When i ask for it´s value on the chart it looks very normal! It shows the normal price on the chart, that it should have. But when i ask in the code for the value...
// Exit orders, long trades if (MarketPosition == 1) { if (iBarShift(NULL, 0, OpenEntryTime) - 1 == 0) { LStop = OpenEntryPrice - MMFrL * MathAbs(iMA(NULL, 0, NMML1, 0, MODE_EMA, PRICE_LOW, 1) - iCustom(NULL, 0, "ZLTrend", PRICE_CLOSE, NMML2, 0, 1)); LStop =