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

[amibroker] AmiBroker 4.51.1 BETA released



PureBytes Links

Trading Reference Links

Hi 
 I am trying to get the below script to buy and sell pivot point or 
at least test this method. 
I would like to buy if the support price is reached and sell a few 
days later at the resistance level from the buy day.
The buy works great but I can't make the sell ref R1 on the Buy day 
as a sell level. 
It sells at a high price on a sell day which I don't understand.
This is my script
//Pivot Point PT
PP= (High+Low+Close)/3;
R1=(PP * 2) - Low;
R2= PP + High - Low;
S1= (PP * 2) - High;
S2 = PP - High + Low;
Cond1 = Low <= S1;
Cond2 = High >= R1;
Buy = Cond1;
BuyPrice = S1;
Sell = Cond2;
SellPrice = ValueWhen(Buy,R1);

//This should Sell at the R1 value
//on the Buy Day?? But it doesn't??

WHAT DO I NEED TO DO.
THANKS
Ernie



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