Posting my EA

 

This is an EA which I started working on a while ago. The entry parameters should be ignored for the time being as I'm planning to input seperate entry criteria. The focus of the code is the handeling of Orders and Stops. The basis for the handeling of the trades comes from Lebeau stops. As I am not a coder, I was hoping for some feed back on the functionality of the Break/Switch blocks and also the code in general. The stops allow winners to run and get out of losers at ATR*3 and then 3 seperate moving averages.

I get a random order send error every now and then that I can't seem to get rid of .

Any feedback would be appreciated.

Thank you,

FPC

 
FXpipclash:

This is an EA which I started working on a while ago. The entry parameters should be ignored for the time being as I'm planning to input seperate entry criteria. The focus of the code is the handeling of Orders and Stops. The basis for the handeling of the trades comes from Lebeau stops. As I am not a coder, I was hoping for some feed back on the functionality of the Break/Switch blocks and also the code in general. The stops allow winners to run and get out of losers at ATR*3 and then 3 seperate moving averages.

I get a random order send error every now and then that I can't seem to get rid of .

Any feedback would be appreciated.

Thank you,

FPC

What is the OrderSend() error that you are getting?


CB

 
cloudbreaker wrote >>

What is the OrderSend() error that you are getting?

CB

Order Modify Error #1, I'm 90% sure it's because nothing changes when you modify the order (when the stop loss should be moving with the moving average). The weird thing is though i'll have it print the value for the moving average and the stop level, it will show me it's the same, but I have the order modify set to go ONLY if the two values are different using the If( Normalize Double(ma3, Digits) != OrderStopLoss() which phy gave me.

Thanks for your help

FXPC

 

Give it a try using the CompareDoubles() function.

Have a look at my post near the bottom of the following thread for the interface and behaviour of that function.

'CompareDoubles()'


CB

Reason: