Cross of TEMA and NONLagMA EA

 

Here is an EA I coded that uses a slightly modified version of the NonLagMA_v7.1_EmailAlert indicator and the TEMA indicator. It works just like an MA Cross EA, except using these indicators.

So far seems to work well on H4 time frames.

I have a variable called FallBack that is used to keep from loosing too much of the gain when the trend starts to change.

Feel free to tryout, comment, or modify.

Files:
 

Uncle Pips. Thanks a lot for the wonderful EA.

 

The EA appears to be taking any number of trades in the direction of the cross.

Can you tell us what the entry criteria is.

 
pudseybear:
The EA appears to be taking any number of trades in the direction of the cross. Can you tell us what the entry criteria is.

For Buy -

TEMA must be greater then NoLag

NoLag must be moving in a positive direction.

NoLag must be less then the Asking Price.

For Sell -

TEMA must be less then NoLag

NoLag must be moving in a negative direction.

NoLag value must be greater then Bidding Price.

To handle only one sell in each direction. We loop through all orders that have the same Magic number, if one exists:

If order is a Sell, and we want to buy - close order.

If order is a Buy, and we want to sell - close order.

If an open order is found, we return (look at bool found).

New orders can only be open at the beginning of each hour. (if(lastTime == iTime(Symbol(), 60, 1)).

Orders can be closed if the indicators no longer support the value at any time.

Orders can also be closed if the profit falls below the fallback value. Equation used for fallback is -

if(OrderSymbol()== Symbol())

{

if(fallBack > 0.0)

{

if(OrderProfit() <= fallBack)

{

CloseOrders();

fallBack = 0.0;

return(0);

}

}

double checkFallBack = (MathFloor(OrderProfit()/(OrderLots() * 100)) - 1) * (OrderLots() * 100);

if(checkFallBack > fallBack)

{

fallBack = checkFallBack;

}

}

This allows us to exit an order that contains profit, but may be taking a turn before the indicators exit us out. (I think of it as "Banking" our earnings).

Fallback does tend to be the way that most orders are exited.

Hope this answers your questions.

 

Thanks for explanation.

I'm surprised theres not been much interest in this EA, it might be in wrong thread.

I put it on eurusd two days ago and its made about 140 pips from 5 trades, gbchf since yesterday has made 56 pips from 2 trades.

It would be good if EA could show drawdown per trade.

 
pudseybear:
Thanks for explanation.

I'm surprised theres not been much interest in this EA, it might be in wrong thread.

I put it on eurusd two days ago and its made about 140 pips from 5 trades, gbchf since yesterday has made 56 pips from 2 trades.

It would be good if EA could show drawdown per trade.

SHHHHH...dont let the elite members know there is a profitable EA in the free section!

j/k

I actually have a hybrid version of this that is doing very well right now, though it has not been running very long to make a huge stink about it yet. This is a version of it that I was testing, but did not perform as well as my current one.

You just need to be sure the selected market is trending, one way to do this is to place the two included indicators on a chart, and not start the EA until there is a strong divergence between the two. If you let it run in a sideways market, you are wasting your time and money!

As for adding things to this, maybe we can get someone else to add this, and get some more help and ideas.

 
unclepips:
SHHHHH...dont let the elite members know there is a profitable EA in the free section!

j/k

I actually have a hybrid version of this that is doing very well right now, though it has not been running very long to make a huge stink about it yet. This is a version of it that I was testing, but did not perform as well as my current one.

You just need to be sure the selected market is trending, one way to do this is to place the two included indicators on a chart, and not start the EA until there is a strong divergence between the two. If you let it run in a sideways market, you are wasting your time and money!

As for adding things to this, maybe we can get someone else to add this, and get some more help and ideas.

Yes I think you are right its worked this week because of strong trend on eurusd. Are you intending on posting your hybrid version? I would be interested in testing it

 

Yeah, you know this was coming UnclePips. The Hybrid will you be sharing that one, one day?

 

I could "Provide it", but it would be through other means like RAS or private sell.

Besides, all the code you need to make the Hybrid, exists in the version posted...you just need to cut some fat.

So far since I started the Hybrid on tuesday it has closed out 250 pips with no loss on EURUSD.

Maybe if I get a minute, I will add the drawdown value to this one.

 

EA with DrawDown

I added a line to the chart to show current drawdown, if one exists.

Let me know how it works for you.

I also cleaned up some of the old code fragments.

 

Thanks UnclePips. l really love this EA. I too am suprise their hasn't been many people that have noticed it.

If you say the Hybrid performs better, then I can't wait to see the results you may post when you have tested it.

Reason: