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

Re: [amibroker] Enhancement Request - "Playback" Function


  • To: "AmiBroker" <amibroker@xxxxxxxxxxxxxxx>
  • Subject: [amibroker] Using Param() to analyze system price-sensitivity
  • From: "Herman vandenBergen" <psytek@xxxxxxxx>
  • Date: Sat, 24 Jan 2004 19:18:06 -0800

PureBytes Links

Trading Reference Links




<SPAN 
class=080283501-25012004>Hello,
<SPAN 
class=080283501-25012004> 
It took TJ's 
help to get this little gem going, it allows you to place your cursor anywhere 
on your chart and modify/vary, using the Param(), the price bar at 
that position. This is very useful when evaluating the response of systems 
and indicators. 
<SPAN 
class=080283501-25012004> 
Note that the 
modified price is only available to subsequent code in the same 
formula. If you want to test a system you need to either paste 
the code ahead of your system's code or copy it into an include file. Or, 
if you need the change to apply to many formulas, you could use the 
SaveParameter() and GetParameter() OSAKA functions I posted some weeks ago to 
accomplish that.
<SPAN 
class=080283501-25012004> 
In system analysis 
you may find that in some systems a small price change of a few cents may make 
the difference between going Short or Long. In Indicator analysis you may find 
that the effect of a price change last much longer than you thought. 
For <SPAN 
class=080283501-25012004>example the code below shows that a price change may 
effect the RSI(4) value as far away 20 bars away. 
<SPAN 
class=080283501-25012004> 
have 
fun!
<SPAN 
class=080283501-25012004>herman.
<SPAN 
class=080283501-25012004> 
<FONT 
face=Arial>CursorBar   = SelectedValue<FONT 
color=#000000>(BarIndex()) 
== BarIndex<FONT 
face=Arial>(); ParamPrice = <FONT 
color=#0000ff>SelectedValue(<FONT 
color=#ff0000>Close) * (<FONT 
color=#ff00ff>1 + <FONT 
color=#ff00ff>0.01 *<FONT 
color=#0000ff>Param("Close 
% Change",0<FONT 
color=#000000>,-10<FONT 
color=#000000>,10<FONT 
color=#000000>,0.1<FONT 
size=2>)); <FONT 
color=#ff0000>Close = <FONT 
color=#0000ff>IIf(CursorBar,ParamPrice,<FONT 
color=#ff0000>Close<FONT 
face=Arial>); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff0000>C,<FONT 
color=#ff00ff>"Close",<FONT 
color=#ff00ff>1,<FONT 
color=#ff00ff>64<FONT 
color=#000000>); Plot<FONT 
color=#000000>(RSI<FONT 
color=#000000>(4<FONT 
color=#000000>),"RSI(3)"<FONT 
color=#000000>,1<FONT 
color=#000000>,1<FONT 
color=#000000>|styleOwnScale<FONT 
color=#000000>,0<FONT 
color=#000000>,500<FONT 
size=2>); StoRSI4 = (<FONT 
color=#0000ff>RSI(<FONT 
color=#ff00ff>4)-<FONT 
color=#0000ff>HHV(<FONT 
color=#0000ff>RSI(<FONT 
color=#ff00ff>4),<FONT 
color=#ff00ff>4))/(<FONT 
color=#0000ff>HHV(<FONT 
color=#0000ff>RSI(<FONT 
color=#ff00ff>4),<FONT 
color=#ff00ff>4)-<FONT 
color=#0000ff>LLV(<FONT 
color=#0000ff>RSI(<FONT 
color=#ff00ff>4),<FONT 
color=#ff00ff>4))*<FONT 
color=#ff00ff>100<FONT 
color=#000000>; Plot<FONT 
color=#000000>(StoRSI4,"StoRSI4"<FONT 
color=#000000>,1<FONT 
color=#000000>,1<FONT 
color=#000000>|styleOwnScale<FONT 
color=#000000>,0<FONT 
color=#000000>,500<FONT 
size=2>); <FONT 
color=#ff0000>for(n=<FONT 
color=#ff00ff>0;n<=<FONT 
color=#ff00ff>100;n=n+<FONT 
color=#ff00ff>10) <FONT 
color=#0000ff>Plot(n,<FONT 
color=#ff00ff>"",<FONT 
color=#ff00ff>0,<FONT 
color=#ff00ff>1|<FONT 
color=#ff0000>styleOwnScale|<FONT 
color=#ff0000>styleNoLabel,<FONT 
color=#ff00ff>0,<FONT 
color=#ff00ff>500<FONT 
color=#000000>); GraphXSpace<FONT 
color=#000000> = 50<FONT 
color=#000000>; 


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.