Forum

Position ticket not available

I have a global variable ulong posTicket; and on the onTick function I use this condition to open a trade if(posTicket<=0) { trade.Sell(lot_size, _Symbol ); posTicket = trade.ResultOrder(); } Using a print statement I found out that the global variable does not hold the ticket value and is 0 at

How to identify clean range to the left hand side of the chart

I am trying to code an expert advisor that runs on simple price action, If price breaks above the recent resistance with clean range to the left hand side, open a buy position. Could somebody help me in trying to code the bit that identifies the clean range to the left

Help with script to find Support and Resistance in MQL5

Hello Everybody, I am still learning when it comes to mql5. I'm trying to code a script that will find support and resistance levels. I'm having problems populating arrays that will hold high values for resistance and low values for support as well as sorting them in ascending order to merge values

Help with iBandsOnArray in MQL4

I've having trouble setting up bollinger bands for rsi values What I've attempted so far for ( int a= 0 ; a< 40 ; a++) { rsi[a] = iRSI (Symbol(),Period(), 14 , PRICE_CLOSE ,a); bbrsiup[a] = iBandsOnArray(rsi, 0 , 34 , 2.0 , 0 ,MODE_UPPER,a); bbrsidn[a] =

Help with S&R , Trendline EA

Hey, i want to know if it's possible to make an ea that will detect support and resistance levels as well as trendlines. If so, please guide me on how I can ho about creating one, thanks in advance

Multi Symbol and Multi TimeFrame EA in Mql5

I've been trying to code my EA to trade multiple symbols and multiple timeframes and have reached a point where i do not know how to proceed, it complies just fine but i know it's not how it should be done, should i use 3d arrays ? and how so ? How do i get the ChartOpen() to distinguish which

Help in looping symbols and timeframes in MQL5

I've been trying to code my strategy into an EA and i use all symbols and all timeframes when using my scalping strategy, i've been trying to do the same with the EA and end up with some error, i am still a little new to coding and my code may be completely wrong but someone help me out. If im using

News on EA, Help.

My trading strategy doesn't include trading trading news events, if USD has news at 5, I won't trade it from 4-6, can anybody help me figure out how do i make my EA do this. Thank you

NEED HELP CODING MY TECHNICAL ANALYSIS INTO EXPERT ADVISOR

I use RSI divergence as my scalping strategy, the information candlesticks provide is important but i also like the simplicity that a line chart provides in help finding patterns, so I've attached a Simple Moving Average of 1 (SMA1) to the chart which acts as a line graph on top of my candlestick

Help on coding expert advisor on market sessions

I would like help in coding the time when my EA on MT4 is turned on and off. GMT 8:00am - 12:00pm GMT 3:00pm - 7:00pm GMT 12:00am - 5:00am These are the hours i trade. What code would i have to use to have my bot run at these times using my MT4 server time . Thank you