Coding help



Mr. Guru could you please help me to constantly refresh an ea after each tick movement.

I have tried everything, But I just can't make it refresh constantly.

What lines of code must I insert to keep an ea and indicator refresh after every tick?



stop loss function and edit time function for Breakout EA


Thanks for taking the time to read this thread.

I have a breakout_EA that places buy and sell orders a specific number of pips away from a selected amount of previous bars. I need to add a fixed stop loss option and adjust the "day_start_hour" function so a half hour can be added, e.g 15:30 instead of just 15:00 or 16:00.

Would really appreciate if someone could take a look at the EA and maybe have a punt at improving it. I have been backtesting the breakout strategy manually and it takes alot of time up.



oheabeta5.mq4  19 kb

two indi ea

please coder guru and any a good coder should help me code the following two indicators (attached) to an ea

1) Dinap_basic sethings 1000, 6--- it is a zigzag based indi I want the dinap _basic indicator not to allow trades when it has drawn against signal direction i.e if it draws up ,entering buy signals are NOT allowed only sell signals, if it draws down ,entering sell signals are NOT allowed only buy signals.

2) supertrend indi



Convert and code ergordic indicator from trade station to MQL4 Code

Dear Guru & Forumer

Can someone pls help me to convert ergordic indicator from Trade station below to MQL4 code. Thank.

Ergodic Indicator by William Blau

ergodic indicator - text version

* To: "Joel"

* Subject: ergodic indicator - text version

* From: "Barry Silberman"

* Date: Tue, 2 Dec 2003 07:07:30 -0800

* In-reply-to:

Here is the code for the ergodic that is very similar to the one used in Woodie's room.

The fellow with the identification of R7 uses a value of 7, 27, 7. That should be equivalent to the values in my indicator of 7, 27, 1, 7.

Here is the text version for the indicator and three functions that can be cut and pasted:


Barry Silberman

Type: Function, Name: TXAverage

{TXAverage function

FORMAT: TXAverage(Price,r,s,u) }

Inputs: Price(NumericSeries), r(NumericSimple),s(NumericSimple),


TXAverage = XAverage(XAverage(XAverage(Price,r),s),u) ;

Type: Function, Name: TSI

{TSI function = True Strength Index by Bill Blau}

{FORMAT: TSI(Price,r,s,u)

Where: r = length of first EMA smoothing of 1 day momentum,

s = length of second EMA smoothing of 1 day smooting,

u = length of third EMA smooting of 1 daymomentum.}


Price(NumericSeries), r(NumericSimple), s(NumericSimple),


Value1= 100*TXAverage(Price-Price[1],r,s,u) ; { Numerator }

Value2=TXAverage(AbsValue(Price-Price[1]),r,s,u) ; { Denominator }

If Value2 0 then TSI = Value1 / Value2

Else TSI = 0;

Type: Indicator, Name: Ergodic Indicator

{Ergodic Indicator:}

{from William Blau's book --- "Momentum, Direction and Divergence"

FORMAT: Ergodic_TSI(Price, r, s, u,, SmthLen)

where r = length of first EMA smoothing of 1 day momentum,

s = length of second EMA smoothing of 1 day smooting,

u = length of third EMA smooting of 1 daymomentum,

SmthLen = length of ema signal line.

This is plotting the Average only (value2)}

Inputs: Price(c), r(7), s(27), u(1), Zeroline(0), SmthLen(7),

upcolor_1(green), downcolor_1(red), dotsize(2);

Value1= TSI(Price, r, s, u);

Value2= XAverage(TSI(Price, r, s, u), SmthLen);

If value2 > value2[1] then

Plot3(Value2, "SigLin", upcolor_1, default, dotsize);

If value2 < value2[1] then

Plot3(Value2, "SigLin", downcolor_1, default, dotsize);


Hedger Coding help needed

Hi, I need help to change the following ea. Currently it waits for you to place an order and then opens an opposing order x pips away at double the previous lot size....As an example lets say you open a buy order at 0.05...the ea will then open a sellstop x pips away at 0.1....if that order is triggered then it will open a buystop at 0.2 lots etc....I need it to open orders as 0.05, 0.06, 0.07, 0.08 etc...

Any help appreciated...Best rgds and Many thanks..

hedger.mq4  9 kb

One Click Trading

Hi, can anyone educate this script?

Perfect for scalpers, with this script you can trade with one click.


help needed with small ea mod


can someone make this ea only open a trade after the close off the current bar and on the open of the next. Right now it open instantly on the signal anywhere in the bar and i dont want this, it would be greatly aprreciated since ive been messing with it all day but i cant figure it out.


5min-momo.mq4  9 kb

ea mod

hi, this ea buys and sells based on a combination of a moving average and a macd signal. Right now it uses only one ema and that is of the bar close.

Can someone mod this ea that it uses the same ema but of the candle low for long postions and the ema of the candle high for short positions...?

i think this ea might have some serious potential...

5min-momo.mq4  9 kb

ea not setting stops on short positions...

hi for some reason the ea doesnt set a stop loss on short orders, it does use the trailing stop correctly and does set stop and long order...

i checked the code and to my limited knowledge it looks right so please somebody look at it for me....

macd_ea.mq4  6 kb

EA Coding help needed

Hi, I need someone to code the following EA....haveused manually but is very difficult to do so as u need to spend alot of time at the screen...

When EA is loaded it must immediately open a trade based on a moving average cross of 1 and 3 (1 being fast MA and 3 being Slow MA) of 0.1 lots....Lets say it opens a BUY order at 1.5315 - this trade must have a TP of 30 and a SL of 45...A SELL pending order of 0.2 lots must then be placed 15 pips below the BUY order so that would be at 1.5300 (Also with TP of 30and SL of 45)....If first order reaches TP then trade is closed and cycle starts again....If SELL pending order is reached then that trade opens and we have a BUY and SELL open...If SELL reaches TP then all order closed for a profit of 15 pips...If SELL does not reach TP and price moves up then another BUY of 0.3 lots is opened at 1.5315 with same TP and SL as above (this would have been aBUY pending order placed when the SELL order was triggered......this cycle continues till overall profit is reached of 15 pips and all orders are closed......Pending orders to be deletedonce profit is reached...I hope the above makes sense and would appreciate any assistance...Best rgds