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

RE: [amibroker] offtopic: Searching for yahoo ticker for gold



PureBytes Links

Trading Reference Links

Linda,

Dave's solution is on the right track with the idea, though I, too, 
haven't tested the code.  However, one other thing comes to mind even 
though it would likely be a rare occurance:

  What if BOTH 'Cond1B' AND 'Cond2B' occur at the SAME time?  How 
would YOU prioritize WHICH of the two entries should be taken?  So, 
in addition to associating the corresponding 'sell' to it's 
unique 'buy' signal, you should also specify a policy of how you 
resolve potential-entry 'ties' when they (may occasionally) occur.  
If you CLEARLY define the 'tie-breaking' RULE, then it can certainly 
be coded appropriately.

Buzz
-----------------

--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
> How about something like this (untested):
> 
> Sell = IIf(BarsSince(Cond1B) < BarsSince(Cond2B), Cond1S, Cond2S);
> 
> Dave Merrill
>   I want to combine two systems I have into one BackTest.
> 
>   The first is to buy if Cond1B is true and sell if Cond1S is true.
> 
>   The second is to buy if Cond2B is true and sell if Cond2S is true.
> 
>   Now, I want to buy if either are true:
> 
>   Buy = Cond1B OR Cond1S;
> 
>   Then, if I bought because of Cond1B, I only want to test for 
Cond1S for
> selling, and if I bought because of Cond2B, then I only want to 
test Cond1S.
> 
>   How can I accomplish this?
> 
>   Linda



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