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

[amibroker] Dear Traders, this seems to be an absolutely amazing ...



PureBytes Links

Trading Reference Links


Werner,
 
As you know, you are referring to pyramiding.  Here's some info and code to get you to where you want to go.
 
In terms of candidate today and yesterday, just make Condition2 = BuyCandidate and Ref(BuyCandidate, -1);
 
Hope this helps,
Gary
 

Here is a simple sample of pyramiding "emulation":
// the example system buys on monday, wednesday (increasing pos)
// and sells on friday
BuyCond = DayOfWeek() == 1;
Buy2Cond = DayOfWeek() == 3; // pyramid
Sell = DayOfWeek()==5;
Buy = BuyCond OR Buy2Cond;
PositionSize = IIf( Buy2Cond, 2000, 1000 ); // 1000 is first trade
2000 is pyramided
Sell = Sell OR Buy2Cond;
/////////////////
Please set trade delays to zero in the settings page.
http://groups.yahoo.com/group/amibroker/message/21048Werner <WKRAG@xxxxxxxxxxx> wrote:
Good day,I have tested a system that gives me stockpicks based on certain BUY conditions. I noticed that sometimes a stock is a pick today and also WAS a pick already yesterday. These seem to be good candidates. Now I would like to test this idea:If a stock is a candidate today AND WAS a candidate yesterday, double the investment in this stock (let's say from $ 1000 to $2000.I know it is a formula with POSITIONSIZE. Can't seem to put it together though because I do not know how to say "was also a candidate yesterday".Any suggestions?Thank you.WernerSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
 href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
		Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.