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

[amibroker] ApplyStop() and RestoreArrays() interaction



PureBytes Links

Trading Reference Links

Please consider the code below. I want trade stocks in my watch list with
signals derived from the "!NDX" but with two separate stop procedures:

1) Stops are based on NDX data, not price arrays from the stocks being
traded.
2) Stops are based on the individual price of the stock being traded

However Moving the RestorePriceArrays() does not effect the Equity so i seem
to have no control of the data used to calculate stops. I tried using
SetForeign() just before the ApplyStop() but that doesn't do it either.

How can i implement the above two Stop procedures, 1 and 2?

Many thanks,
herman.

SetForeign("!NDX");

// some trading sytem
SR=EMA((RSI(8)-LLV(RSI(8),8))/(HHV(RSI(8),8)-LLV(RSI(8),8)),3)*100;
Buy=Cross(17,SR);Sell=Cross(SR,83);
Short=Cross(SR,83);Cover=Cross(17,SR);
Equity(1);
// end trading system

//SetForeign(Name());
//RestorePriceArrays();
ApplyStop(1,1,5,1);
//RestorePriceArrays();



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

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