How to code? - page 169

 

Thanks, I will try that.

 
Files:
 

Average of Spread Question

This would help to adjust for spreads that change through the day.

I would like to record the spreads each tick for a few minutes, and then get the average of that, and use it, all in an EA.

There is code available to log the spread, but I do not know how to make use of the log.

Big Be

 

Hi,

You can do something like ..

on every tick ..

total = total + spread (from marketinfo)

count++

to get average do this ..

average = total/count

if you need more info pls send (to like2blue at y.a.h.o.o.) for modification.

Cheers,

Blue

Big Be:
This would help to adjust for spreads that change through the day.

I would like to record the spreads each tick for a few minutes, and then get the average of that, and use it, all in an EA.

There is code available to log the spread, but I do not know how to make use of the log.

Big Be
 
birami:
hello

can anyone add sl for this expert .

Id like all orders have a fix sl

Try to use Swiss Army EA

 

Anybody had any luck with EA opening 2(or more) positions?

I can't consistently get my EA to open 2 positions at a time...

I get 1 then 3 then 4 then 2 sometimes. I want to open ONLY 2 positions and do it Every single time I call a BUY or a SELL

Any IDEAS?

THANKS!

 

Thanks Blue Guy

That looks like it would work!

Big Be

 

Help with EA

Hi,

Just a newbie here who is trying to code his very own EA. I'm trying to write an EA that buys/sells every time the last two digits of the price reaches a specific level (i.e. 1.3700, 99.00, 56.00 etc). It should only take into account the last 2 digits to ensure it works across all pairs.

How do I code an EA that calcuates the last two digits each tick?

Appreciate an help

 

Look at

double NormalizeDouble( double value, int digits)

If you put digits=2, you can see what you want.

 

Closing out any open order if SL is 10 Pips or greater

How do I create an EA that will close out any open ticket order from multiple EA's if SL is 10 Pips or greater??

Dave

<<<

Reason: