Moving Average - need help with TP

 

Hello,

The following EA based on Moving Average works perfectly on EUR/USD H4 200-6, EUR/USD H4 200-6, EUR/USD, H4 40-6 EUR/USD and AUD/USD H4 200-6. I think that TP would make this EA work better in shorter timeframes EUR'USD 20-6 M15, H1...Could somebody help me to add TP to this code?

Thanks,

Martin

Files:
 
billy90:

Hello,

The following EA based on Moving Average works perfectly on EUR/USD H4 200-6, EUR/USD H4 200-6, EUR/USD, H4 40-6 EUR/USD and AUD/USD H4 200-6. I think that TP would make this EA work better in shorter timeframes EUR'USD 20-6 M15, H1...Could somebody help me to add TP to this code?

Thanks,

Martin


Here is...
Files:
 
pannek:

Here is...

Thanks a lot! I tested the new code with TP, but it works only when I cancelled "trailing stop function" from the code. The TP function doesn't work paralerly with trailing stop. Do you have any idea where the problem could be?
 

I put function for 4 or 5 digits broker, and correcting money management.

In my broker working perfect....

Files:
ma_ea.mq4  7 kb
 
pannek:

I put function for 4 or 5 digits broker, and correcting money management.

In my broker working perfect....


Yes, with the LotsPercent 10 it works perfectly...I think I will rather prefer more conservative strategy of money management, but the looks great anyway!
 
billy90:

Yes, with the LotsPercent 10 it works perfectly...I think I will rather prefer more conservative strategy of money management, but the looks great anyway!

Chance LotsPercent to 1 or smaller.....................