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

Re: [amibroker] Re: Basic programming question



PureBytes Links

Trading Reference Links

Sorry, missed that you didnšt know that part.

DD = Ref(C,-1)/Ref(C,-2); //Yesterday's close / Day before that close

X = optimize("X",1.03,0.9,1.1,.01); //Allows to optimize the value of X
// OR
X = Param("X",1.03,0.9,1.1,.01); //Allows to change the value of X on graph
// Don't use both of the above lines, pick what suits your purpose.

Buy = Cross(DD,X);
Sell = ???; /*You will need a Sell signal as well as Short and Cover unless
you are testing Long only.*/
-- 
Terry

--
Thanks buy how do I program DD=price of yesterday/Price of day before
yesterday.
what would be the acceptable syntax.
Thanks

Rizwan


--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> Buy = Cross(DD,X);
> -- 
> Terry
> 
> 
> From: "rizwankherati" <rizwankherati@xxxx>
> Reply-To: amibroker@xxxxxxxxxxxxxxx
> Date: Fri, 15 Oct 2004 16:14:55 -0000
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Basic programming question
> 
> 
> Hi,
> 
> I am on trial and needed some help with the following, I want to
> program a buy when value of a variable(DD) is greater than X(where X
> is a fixed value in number). DD is calculated as closing price of
> yesterday divided by Price of daybefore yesterday.
> 
> SO:
> 
> DD=price of yesterday/Price of day before yesterday.
> Buy if DD > X
> 
> How can I write this function in AFL?
> 
> Many thanks
> 
> Rizwan
> 
> 
> 
> 
> 
> 
> 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
>  
<http://us.ard.yahoo.com/SIG=129gelq85/M=315388.5497957.6576270.300117
6/D=g
> 
roups/S=1705632198:HM/EXP=1097943317/A=2372354/R=0/SIG=12id813k2/*http
s://ww
> w.orchardbank.com/hcs/hcsapplication?
pf=PLApply&media=EMYHNL40F21004SS>
> 
> 
> 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
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> *  
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service
> <http://docs.yahoo.com/info/terms/> .
> 
> 
> 
> 
> [Non-text portions of this message have been removed]





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
 <http://us.ard.yahoo.com/SIG=12913ojo9/M=315388.5500238.6578046.3001176/D=g
roups/S=1705632198:HM/EXP=1097944116/A=2372354/R=0/SIG=12id813k2/*https://ww
w.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS>


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
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
*  
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/