Forum

Array out of Range in iBarshift..

Hi, I am getting critical error '' Array out of range " in iBarshift function. I am trying to create an EA based on breakout but iBarshift function throwing error at Time[pos] field. Please check the code..regards. limit = Bars - 1 - counted_bars; // Iteration for ( int pos = limit; pos >=

MT4 hangs and changes settings when I try to run stretch indicator code..

Hi, I am trying to draw stretch for the day using this indicator but when I execute it , instead of showing output it hangs my MT4 terminal and settings. It does something wrong with especially last few lines of codes . Please check the code.. regards. #property indicator_separate_window #property

MT4 default folder changed automatically..

Hi, I was trying to run an indicator and my settings got changed in MT4. Default folder also got changed. How do I change my DEFAULT folder back to previous folder in MT4? .. regards

MT4 crashed while using an EA

Hi, my MT4 crashed while I was testing my EA. My script had to call another script which I already successfully tested. Now when I restarted it , I lost my settings and default folder also changed. Please suggest why it may have crashed and how to change default folder in MT4.. regards

iBarshift PERIOD_H4 + PERIOD_H1 does not work in MT4

Hi, I want iBarshift to continue calculations for Two more hours thus making it 6 hours before other function. It can be seen in code but since there is no PERIOD_H6 in iBarshift parameter I am trying to manually add PERIOD_H1 or 60 two times to add two more hours but they are not working..how do I

Printing Arrows after crossover and text

Hi, I am trying to print Buy and Sell arrow depending on the nature of crossover but this code is printing both the arrows on chart after crossover while depending on the condition it should print one of them. if (shift== true ) { if ( OPEN > CLOSE ) { BufferBuy[pos] =

I am trying to open trades based on a Fractals. Code compiled without error but it is NOT opening any trade..

Hi, I am new to MQL4 programming . I am trying to add code to my EA using fractal. The condition is if there is NOT Up Fractal in last 4 bars , it should open BUY trade..Here code compiles without Error but it is NOT opening trade.. here's the code: bool Upfractal() { int a; for (a= 1 ;a< 5

On while statement a warning is given .. possible use of uninitialized variable 'i'

Hi, I am trying to put fractals on my chart with this code but on while(i>=2) statement, it says --> possible use of uninitialized variable 'i' why is 'i' not getting initialized when its getting initialized in if statement.. ..regards. int start() { int i; bool bFound; double

Hi.. I want to check current running orders and want to place a condition that if there is NO current running order then OrderSend(...)

Hi.. in MT4, I want to check current running orders and want to place a condition that if there is NO current running order(either BUY or SELL) then OrderSend(...) in MT4 Regards

MT4 error when I compile program

Hi, when I try to compile EA I get this error " Return value of 'OrderSend' needs to be checked". I am trying to create EA based on RSI of two currencies and based on that open trades.. How to resolve this error? Regards