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

RE: [amibroker] How to select one of two entry rules.



PureBytes Links

Trading Reference Links

Buy1 =
Sell1 =
Position = Flip(Buy1,Sell1);
Buy2 = iif(Position==1, one rule, other rule );
...

herman
  -----Original Message-----
  From: Collectable Images [mailto:telecard@xxxxxxxxxxxxxx]
  Sent: Tuesday, October 19, 2004 7:59 AM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] How to select one of two entry rules.


  Anyone able to assist on this code problem?

  I have a simple buy and sell rule but once in a trade in either direction
  (long or short) I have a different rule to reenter same direction or to
  reverse from long to short. I cant see how to code this.



  Long_Entry_rule = blah blah; //initiate a change from Short to Long
  direction
  Short_Entry_rule = klab_klab;//initiate a change from Long to Short
  direction


  Long_exit_rule = hahaha; //exit a long position
  Short_Entry_rule = adadad; //exit a short position

  Long_Reentry_rule = afaga; //reenter a long after a completed long
position
  but before a short signal occurs
  Short_Rentry_rule = ayhytr; //reenter a short after a completed short
  position but before a long signal occurs






  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


        Yahoo! Groups Sponsor
              ADVERTISEMENT





----------------------------------------------------------------------------
--
  Yahoo! Groups Links

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

    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/