Forum

Issue on converting EA

I have written an EA which works perfectly fine on MT4. However, when it comes to running the same entry positions on MT5 it just doesn't wotk. I have spent hours tryna get it to work but cant seem to see what I am doing wrong. Below is the MT4 snippet of the source code. void OnTick () { if

Quick opinion on bullish and bearish candle formation

Hi guys, I'm in the process of just adjusting a few entry command but i was wondering how one would attempt coding my EA to enter on a two bullish bar formation? I've tried the Close[0]>Open[0] but when I run the EA it doesnt actually open positions when the conditions are met. It still sometimes

Auto Adjusting lot size error

Hi guys, I have been trying to implement a code which will be able to adjust my lotsize based on the percentage of equity. I am not getting any errors but i am getting warnings which is preventing my EA from running in the strategy tester . double Lots= 0 ; double Equity= AccountEquity (); double

Distance of Moving average

Hi guys, Would it be possible for someone to help me find a way to tell me EA to only execute trades when there is a specific distance between two moving averages? For example double ma50= iMA ( Symbol (), 0 , 50 , 0 , 1 , 0 , 0 ); double ma200= iMA ( Symbol (), 0 , 200 , 0 , 1 , 0 , 0 ); I

Implementing TrendLine with EA

Would it be possible for someone to explain how i may be able to implement a trendline within my EA? I've tried looking for custom indicators and trying to use the setindexbuffer but cant seem to find a buffer which is related to a trendline. Would it be possible to manually draw a trendline and