Forum

This code isn't closing my manual trades. please help.

This trade was to help me in scalping. but it isn't closing trades. Objective was to find alternative for sl or tp at a level closer than stop levels of a pair. please help. Tried closing them by removing any condition for closing trades but it still didn't work. These set of statements to close

How to get details of candlesticks from all timeframes?

I declare arrays open,high, low and close and use copyopen to copyclose to get details of previous candles. I dont declare ontick() but use OnTimer() with a timer value same as timeframe of chart. this helps me get these details of any number of previous candles. Now suppose i am working in 15m with

I think the forward testing option given in mt5 is not good enough, and this method of manual forward testing is better. Any opinions?

Forward testing option given in mt5 is perhaps not so good. In my opinion if we manually pass the better range of selected parameters for forward testing, it'll be a better reliable testing. This is done to prevent solo high result surrounded by all lows from being passed for forward testing and

I have seen people making 50k% returns per month in trading contests. Anyone can give some some insights about their EA?

I was browsing online and I came to a broker who has been organizing trading contests. I went through their archive have results of all contests they have ever organized and I was surprised to see that there are people making more than 50k% or 50000% gains in a month. I wish to know some insights

Learning to code. Need help with this.

I Wanted this EA to to buy and close at 20 ma crossings. Only buy when above 50 ma and ignore sells. Similarly only sell trades when below 50 ma and ignore buys. It was at least opening trades when wanted when i had only 20 ma. so it should the same with new ma. but it is doing so randomly. Pls

Suggest Few Books to learn MQL5 Programming

I started with MQL5 reference and this website. These are already the best but all went above me as i didn't know the basics, even though i know few other programming languages but they were of no help in understanding the concept. After wasting about an year , i got my hands on a book for EA prog

Help me find the logical error in this sample code from a book.

I am still learning to code and this code was given as an introductory sample... It used ORDER_FILLING_FOK, but with both ORDER_FILLING_FOK and ORDER_FILLING_RETURN it gave an error as "unsupported filling mode". So i tried with ORDER_FILLING_IOC. Now it opened the order but didn't seem to close it

Market Impact of limit and stop orders untill executed.

Suppose I am in a buy trade of lot 0.1 entered at 3, currently at 4 and my target is at 5. If I put huge sell limit order of around 10 lots at 5 or 6 or around 5 will it have an impact of driving the market up. Or for that logic If I put huge buy stop order of around 10 lots at 5 or 6 or around 5

Filter results when sorted according to volatility and ATR separately don't match,whereas they should match because ATR is just a mathematical interpretattion of volatility.

I got around 13 results when using a filter on finviz. Then to narrow them down I used volatility filter(abv 5% this week) and ATR filter(over 5) separately on the results. I got 3 results with Volatility filter and 7 with ATR filter but none ot those 3 were in these 7 whereas they should have been

Perhaps even the simplest code is showing error when compiled by me.any idea.?

void OnTick() { double mymovingaveragearray1[],mymovingaveragearray2[]; int movingaveragedefinition1 = iMA {_Symbol,_Period,20,0,MODE_EMA,PRICE_CLOSE}; int movingaveragedefinition2 = iMA {_Symbol,_Period,20,0,MODE_EMA,PRICE_CLOSE}; ArraySetAsSeries(mymovingaveragearray1,true);