LSMA - Help please

 

Am trying to use the LSMA from FX Sniper in an EA.

Using the online EAB for coding with no success.

I have asked for help in another post with no responses.

It's a simple problem, if anyone can help please respond.

Thanks.

 

Try this

Try this, its the bare bones but let me know if it doesnt work properly

Files:
lsma_ea.mq4  3 kb
 

Hi waltini,

Thanks for your help.

Unfortunately, it does nothing at all, no results.

It's referencing the indicator incorrectly, the custom indicator name is different. I recoded with the correct name and it does not work either.

I've attached both the EA and the indicator; any help appreciated.

Thanks again.

Files:
 

Try again

Try this. Whilst I am an amateur myself, have a look at how the indicator is referenced in the icustom function.

This is an easy fix which comes up frequently and you should quickly be able to do this yourself.

This is a funny indicator because the yellow section appears when the change occurs regardless of how quickly the change happens.

Have a play with the nonlagv5, you might like it better. Try adjusting the filter setting.

Files:
 

Hi waltini,

Thanks again for your help.

It works partially now; if I input a S/L and T/P it will close the trade and if necessary take an opposite trade. If I do not input a S/L or T/P the first trade never closes out. In other words, it will not reverse itself by a color change, it has to have stops.

Are there "Close Buy" and "Close Sell" commands in this?

Again, I have no idea how to remedy this. My programming skills are pretty much limited to what I can do with the online EAB. I have no knowledge of programming language.

Thanks again,

W

 

Lsma Ea

I have written several experts that use LSMA and even have the indicator coded as an internal function. I have one that uses LSMA cross and another that uses LSMA angle. The LSMA cross version worked very well in 2005 but now needs differnt values for the MA periods to be profitable.

I have another version that looks at 3 periods and wants them all to be green for buy or red for sell. Exit is when 2 of the three reverse.

I will also look at the one posted.

BTW there is a newer version of the LSMA indicator that rounds the final value to the proper precision based on Point for the currency pair. Otherwise the colors are a little off at times because the code is checking for current > previous for green. This can happen when price goes from 1.9215 to 1.9215000001.

What you really want to compare is 1.9215 and 1.9215 which should give a yellow color.

 

If you've posted your EAs, can you point me to them?

I've searched "LSMA" on the forum and have not found any EA's as yet...

Thanks again,

W

 

Lsma Ea

William,

Here is the first version.

It places buy trade when line is green, sell when line is red. Exit trade on revese condition.

It includes MM, will close trades on reverse signal and uses the same code as the attached indicator.

I need to modify the other EAs I have to use the updated functions in the code. Some of the EAs were written over 2 years ago.

I have another indicator that shows the same color change idea for the standard MAs.

Robert

Files:
 

Thanks for your work, it's very much appreciated.

Will backtest and provide feedback.

Thanks again.

W

 

No soap...

I've backtested the above as a standalone system with different TF's and many different parameters. I don't see any potential so far either as a long term or scalping system, or even as a trend filter.....

If your other systems have shown potential I'd certainly be interested.

Thanks again.

 
Reason: