Forum

Find time at index 1

I have indexs in my code and I want to know the amount bars/ time from signal point and index. here is my code: if (a[ 1 ]>=a[MaxIndex]) = OP_BUY ; I I want to know amount of bars between signal point and MaxIndex. How do I find time at MaxIndex? Thankyou

Tick chart

Is it possible to get tick chart on mql4 or mql5 or 1 sec bars. Anyone can point me to necessary directory would be greatly appreciated

Time difference between two indexes.

How do I get the time difference from two points within an indicator. I have two indexes and I want to know the difference in time between them, or the amount of candles from e.g index1 to index2. Thanks

add object to alert

I have an alert set when xyz happens, I would also like an arrow to be painted on the graph every time this occurs. I have added another buffer but am a little confused how I add this also. Any help much appreciated. if (a[ 1 ]>=a[MaxIndex]) Alert ( "Price Exceed" ) + (Add line object ) ;

code to alert when high/low value of previous index surpassed...

for(int i=0; i<Bars-10; i++) { a[i] = 0; b[i] = 0; double Main = iMACD(NULL, 0, FastEMA, SlowEMA, SignalEMA, Price, MODE_MAIN, i); double Sig = iMACD(NULL, 0, FastEMA, SlowEMA, SignalEMA, Price, MODE_SIGNAL,i); a[i] = Main; b[i] = Sig; c[i]=EMPTY_VALUE; d[i]=EMPTY_VALUE; } int Index=0; int

Create multi timeframe indicators..

I tried creating use different timeframes within my code but when I run on meta trader the display arrows are all over the place. Basically I want to work such that if 'condition' (M5) = x and Condition (M15) = x, then do 'this'.... Can anyone point me in the right direction or offer insight as

Breakeven not working

I have this in my EA and it compile and run with no errors. All trades are made in backtester as well. But it seems to ignore the breakeven totally... Is there something wrong here? extern double Breakeven = 30 ; //+------------------------------------------------------------------+ //| My

Add more timeframes for backtesting

Is there a way to add additional timeframes to backtest on MQL4

ihigh for Stoploss in EA

Can I use ihigh and i low for stoploss in an EA, and which part of the code should I add it too? Thanks

How to use iHigh and iLow for StopLoss?

I want to use high/ low of previous bar for SL. Right now I have it set at static value in extern int. I want to add sl = iHigh(NULL,0,1) and I understand that the change needs to come after order send, but whatever I try it will compile with no errors but not run properly on backtester... Please