Forum

How to get Stop Out Level and Margin call level

Hello, Different brokers have different Margin call and Stop out level percentage. How to get that using MQL4 code? I am trying something like this but not working double marginCallLevel = AccountInfoDouble (ACCOUNT_MARGIN_CALL_LEVEL); double stopOutLevel = AccountInfoDouble

Best Approch to calculate the Maxium Lot size

Hello, I am not taking Stop Out Level, Risk Percentage or Stop Loss into the consideration, The maximum lot size i can take in my account with Account Balance. While calculating the Lot size one major problem is Forex = 100000 Unit Gold = 100 Unit Silver = 1000 or Maybe 5000 Unit Similarly for

Formula to calculate Maximum Lot size based on Account Balance, Leverage and Currency Pair

Hello, Let say, Account Balance / Free Margin : $200 Leverage : 1000 Currency Pair : GBPUSD Account Currency : USD Currently i am using : https://www.hfm.com/int/en/calculators/position-size-calculator and this show accurate Lot size but i am looking for formula so i can code into my EA. How can i

Non Derivative Forex Trading

Hello, Contract for Difference (CFD) is a derivative product, which means we do not own any assets directly; instead, the value of the CFD product is derived from underlying assets. Therefore, CFD trades are not real currency exchanges. Is there any forex trading that is not a derivative, allowing

Closed the trade based on Time duration

Hello, I made the code, which close old trade after X time from Order Open Price . My code : void StopOrderSL( int trade_close_magic) { for ( int pos_0 = OrdersTotal () - 1 ; pos_0 >= 0 ; pos_0--) { OrderSelect (pos_0, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() != Symbol ()

How to convert classic Trailing Stop Loss to Virtual Trailing Stop Loss

Hello, Normally, Stop Loss execute in broker server and it send a data of Stop Loss value to broker. This has a disadvantage of too many operation and also Stop Hunting from most of the Forex brokers. To avoid this, i heard there is a concept called Virtual Stop loss which act same as normal but it

How to add different Timeframe Moving Average and RSI indicator in one chart

Hello, I am adding Moving average indicator with Period 5, Shift 0, Method Linear weight, apply to close price to GBPUSD Chart. I want this same value 3 moving average indicator for same currency pair for 3 time frame (1 Min, 5 Min and 15 Min). I can do this by adding the moving average by opening 3

What is Period in iRSI or iMA or any Indicator

Hello, What does the period value in Indicators? . If i set period = 5 , this means (for 1 min timeframe, Period = 5 min), (for 5 min timeframe period equal to 25 min) , (for 15 min timeframe period = 75 min) and so on?. Period me number of candles in past from current candle

(History Center) How to download Chart History from Broker Server instead of MetaQuotes

Hello, When i download Chart History it getting downloaded from MetaQuotes but i want a Data from my broker server?. How to download that using Metatrader 4

OP_ALL is not working

Hello, Code to count orders : int trade_count_ordertype( int trade_count_ordertype_value, int trade_count_ordertype_magic) { int count_4 = 0 ; for ( int pos_8 = 0 ; pos_8 < OrdersTotal (); pos_8++) { OrderSelect (pos_8, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() != Symbol