Forum

How to find the value of previous candle in an indicator?

I'm new to indicators. I'd need to find the open/close of the previous candle on my indicator. It's basically an indicator that shows buy/sell arrows on the chart. I want to check 2 previous candles and if there is an engulfing candle I highlight with an arrow: I'm using this code but it errors that

Legal Questions

Is the MQL site FCA regulated? Must one be FCA regulated to provide signal here? What about selling indicators? What about selling expert advisors? Any regulatory obligations/challenges

How to get access to the Open/High/Close/Low candles of Other Timeframes from Inside the OnCalculate() method of indicator

Imagine the input timeframe for the indicator is PERIOD_H4 and indicator is placed on the M15 timeframe. Inside the OnCalculate() I'd need to access the Open/High/Close/Low candles of the input timeframe which is H4 but apparently inside OnCalculate() we only have access to the current timeframe so

How to Group By in MQL?

I have an array of objects such as: class RunningOrder { private: public: datetime OpenDate; string Market; double RiskAmount; }; RunningOrder _runningOrders[]; How do I group the objects by one of the properties e.g. the Market property? Basically, I'd need the equivalent of this C#

Strategy Tester Multiple Charts of the Same Symbol on Different Timeframes?

MT4 Strategy Tester has a big limitation. it doesn't show multi timeframes when running tests. Like I want to see the Daily, H4 and H1 timeframes at the same time when it runs. Any solution to add multiple charts/timeframes to the runner on Strategy Tester at the same time

How to calculate the pip value of a Currency Pair based on the Account Base Currency?

Assume the account balance is £1000 in GBP. I'd like to buy a 5 digit market such as EURUSD (1.11270) with 50 pips (500 points) but only risk 1% so 50 pips = £10 so every pip should be worth or cost 20 pence for me. So what is the formula to calculate the lot sizing so that each pip cost me 20 pence

Method returns an invalid pointer?!

I have the below method, but it returns an invalid pointer , wham am I doing wrong? RunningOrder _runningOrders[]; RunningOrder* RunningOrdersHelper::LowestBuyOrder() { RunningOrder *result = NULL ; for ( int i = 0 ; i < ArraySize (_runningOrders); i++) { RunningOrder current =

MQL4 Arrays / Lists

Is there any easy to use library for MQL4 to do list creation, searching and sorting? Like C# Generic Lists? The default Array functions look very limited and I’d have to re implement the sorting / searching functionalities from scratch. Thanks

How to place a trade on MT4 using C# or JavaScript?

I don’t usually have access to MT4 on my desktop. Would that be possible to open a new trade on MT4 via C# or JavaScript over the web? My broker, ICMarkets, doesn’t provide an API. Thanks

Warning, Forex Unlimited Risks Beyond Your Account Balance?!

Hi, Just wondering when can the unlimited risks of Forex happen that we must avoid? I mean losing more than your account balance . Usually broker is supposed to margin call you out but sometimes they can't! There is no liquidity in the market! How often such disasters happen? Which markets are more