molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Thu May 16, 2024 6:21 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: how to detect crossing point of an 2 EMA's
PostPosted: Mon Feb 22, 2010 6:53 am 
Offline

Joined: Mon Feb 22, 2010 6:18 am
Posts: 1
Hello, first of all thanks for such cool soft!

And there is my question:

How can i detect where two EMA's are crossing?

I were trying to put EMA18 > EMA28 logic symbol but this is not right, because it will cause new and new positions opening while the EMA18 > EMA28.

I need to open position only once(first time) when the EMA18 crosses EMA28 from the bottom, then close it when WMA5 crosses WMA12. Then wait for next cross of EMA18 with EMA28 to repeat the strategy.


Look at the attached picture what i want to do :roll: :

Attachment:
sid_question.jpg
sid_question.jpg [ 90.88 KiB | Viewed 3457 times ]


Any ideas?

p.s. sorry for poor english.

Cheers from Lithuania

sid


Top
 Profile  
 
 Post subject: Re: how to detect crossing point of an 2 EMA's
PostPosted: Sat Feb 27, 2010 8:25 am 
Offline

Joined: Thu Feb 25, 2010 8:58 am
Posts: 4
In my opinion the two MAs are equal in the moment of crossing, ie. the same coordinates, not one of them ist bigger.
Try : MA1 = MA2 , this is the crossing (only) if you want more than one position use:
MA1 >= MA2 .


Top
 Profile  
 
 Post subject: Re: how to detect crossing point of an 2 EMA's
PostPosted: Sun Feb 28, 2010 1:14 am 
Offline

Joined: Thu Feb 25, 2010 8:58 am
Posts: 4
I tried to solve this problem in a simple EA


Attachments:
File comment: Simple EA using two moving averages
EMA_Simple.mol [16.82 KiB]
Downloaded 510 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009