[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] exrem flip for MA cross



PureBytes Links

Trading Reference Links

Hello,

I'm creating a 3 moving averages system.

MA1 fastest
MA2 slower
MA3 the slowest

It opens new position when MA1 crosses both MA2 & MA3 (order doesn't matter) and exits when crosses one of them again (from above or below depending on position).

Problem appears after exiting from position. The situation:
MA1 crosses MA2 & MA3 from below.Long position is opened. After some period MA1 crosses MA2 from above and position is closes. Couple bars later MA1 crosses MA2 again from below. I do not want to open Long position again. It first needs to cross 2 other MAs.

Summaring: 
1. There can't be new long position opened after exiting from previous L.
(the same for S)
2. New position is opened when MA1 crosses MA2 & MA3 (order doesn't matter)
3. Position is closes when MA1 crosses MA2 or MA3.

That's a part of my system but I can't go further without it.

I know it can be done with exrem() or flip() but I don't understand these functions.

Please help,
Thanks!



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/