Forum

check for TimeCurrent()

I have the following code for news trading #include <Calc_Lot.mqh> #include <Points.mqh> #include <check for trading.mqh> #property copyright "Copyright 2022, MetaQuotes Software Corp." #property link " https://www.mql5.com " #property version "1.00" #property strict //variables double

Capture the account balance on day 1 of the month

hi devs, How can I capture the account balance on day 1 of the month? I tried the following code but it failed: If(Day() == 1 && Hour() == 0 && Minute() == 0 && Seconds() == 0 ) { Start_Balance = AccountBalance() }

Enable input based on another input

hi devs, I'm stuck in a problem in mql4 that I didn't find answer anywhere. I need to do the following: When choosing mode1, enable option 1 and disable option 2 and vise versa whe choosing mode2 Is that possible in mql4? Thanks

Automatic validation for my EA

hi guys. I have the issue which faced most developers on this website (no trading operations). I hope someone helps me find what checks are required to pass this validation. (I tried check for lot size validity, enough money, valid ticket) knowing that the code run perfectly on tester (specially on

iCustom Issue

Hi folks, i'm working on an EA based on an indicator using 7 different internal indicators each one named FL1,FL2, ... so i use ICustom fxn The issue is that one indicator (FL2) using 8 different lines (as indicated in attachment) all of them have the same name and value and when i use ICustom it

problem with partial close

hi everyone, I have an issue with my partial close code The calculated LotSizeBuy = 0.04875487 and OrderLots() = 0.04 when i try to Normalize LotSizeBuy it gives 0.05 which isn't equal to 0.04 is there any suggestion so the condition ( OrderLots() == LotSizeBuy ) can be true ? void Partial_Close()

Help in Break Even

Hello dear Traders : ****************** I need to make Break Even for 2 orders with the same symbol simultaneously I get error 130 and error 1 Any Ideas? Here is the code : void Break_Even() { { if (OpenOrdersThisPair( Symbol ())== 2 ) if ( OrderSelect ( 0 , SELECT_BY_POS , MODE_TRADES )) if