How to code? - page 56

 
Michel:
You do not really need a function, it's enough to put in the init() function:
myPoint = 0.0001; if (Digits < 4) myPoint = 0.01;

I would do it your way if I only had a few EAs to worry about. I actually have this code in a library along with numerous other functions that use myPoint instead of Point in the code. That way I only need to change code in one place and recompile all EAs. Just in case some broker decides to add another decimal place.

Robert

 

trailing stop needed

PANNEK:
can you any body help me?

I want expert 20_200 with trailing stop.

PLEASE put anybody.

What type of trailing stop?

I have over 10 types now.

Robert

 

Triling Stop

MrPip:
What type of trailing stop?

I have over 10 types now.

Robert

Sorry, I don't know exactly, but

I thing is good like this ea. EA_TrendStrengthEMAv2

 

Today Yesterday Now functions..

I want to get a date range.

Yesterday at 5 PM to 3:00 AM today... then want to look at the bars between that range.

I dont see a function to get the beginning of the day (seconds from 1970)

I can do the math myself, by using modulus etc. but wondering if there any easy mt4 functions Im not seeing to do this..

There must be an easy way in MT4.

Craig

 
Ghamm:

...

I dont see a function to get the beginning of the day (seconds from 1970)

I can do the math myself, by using modulus etc. but wondering if there any easy mt4 functions Im not seeing to do this..

There must be an easy way in MT4.

Craig
TodayBegin=iTime(NULL,PERIOD_D1,0);
 

MrPip help me please...

PANNEK:
Sorry, I don't know exactly, but I thing is good like this ea. EA_TrendStrengthEMAv2

if you can, please help me

 

trailing stop added

PANNEK:
if you can, please help me

Try this version. I did not change the version number, just added trailing stop for the EA_TrendStrength you posted.

Robert

Files:
 

Thanks

MrPip:
Try this version. I did not change the version number, just added trailing stop for the EA_TrendStrength you posted. Robert

Thanks MrPip

 

looping problem..., help!

I'm trying to figure out what is wrong here. I wrote this little indicator as to try and find out why I can't seem to draw arrows on every single bar in a chart. No good reason to.

I have another indicator that i'm working on that'll be discreet on choosing which one, i wrote this to try and figure out what the darn problem is.

It only draws an arrow on the bottom of the candle for the last few bars. It should draw arrown on every single bar in the chart on the top and bottom of each candle.

And only 1 candle's data is showing up in the data windows.

I've included a pic and the indicator. any help would be appreciated.

 

Are you sure? Have you "compressed" the price scale to make sure it doesn't draw outside the current window?

Reason: