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

Re: [amibroker] Secure AFL?


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: RE: [amibroker] StaticVar Application: Measure price changes between clicks
  • From: "Herman van den Bergen" <psytek@xxxxxxxx>
  • Date: Mon, 26 Jul 2004 14:26:45 -0700

PureBytes Links

Trading Reference Links




Thank 
you  Tomasz, good point. However the code is intended to illustrate a 
possible use of Static vars. For example, in my personal application 
I use this code to collect sequential prices for further analysis 
and tabling on the chart. I think that would be difficult (impossible?) to 
do without Static vars :-)
<FONT face=Arial color=#0000ff 
size=2><FONT face=Arial 
color=#0000ff size=2> 
best 
regards,
<FONT face=Arial color=#0000ff 
size=2>herman.
<SPAN 
class=296341321-26072004><FONT face=Arial 
color=#0000ff> 
<SPAN 
class=296341321-26072004> -----Original Message-----From: 
Tomasz Janeczko [mailto:amibroker@xxxxxx]Sent: Monday, July 26, 2004 
3:51 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: 
[amibroker] StaticVar Application: Measure price changes between 
clicksImportance: High

  Hello,
   
  An easier solution would be using BeginValue and 
  EndValue functions
  <A 
  href="">http://www.amibroker.com/f?beginvalue
  
  <A 
  href="">http://www.amibroker.com/f?endvalue
   
  Best regards,Tomasz Janeczkoamibroker.com
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    Herman van den 
    Bergen 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">AmiBroker YahooGroups 
    Sent: Monday, July 26, 2004 9:48 
    PM
    Subject: [amibroker] StaticVar 
    Application: Measure price changes between clicks
    
    This function is 
    handy to measure the price difference between two points, click on the first 
    and then the second and read the difference. I use it to get an idea of 
    indicator profitability by clicking on various points on my charts. It 
    works under Real Time Refresh conditions. You can modify this to work 
    horizontally to measure distances between bars.
    <SPAN 
    class=250152519-26072004> 
    Best 
    Regards,
    <SPAN 
    class=250152519-26072004>herman
    
    Plot<FONT 
    color=#0000ff>(C,"",1,128);function<FONT 
    color=#0000ff size=2> PlotHorCursorClicks( Price )<SPAN 
    class=250152519-26072004>    {<SPAN 
    class=250152519-26072004>    CurrentPrice = 
    SelectedValue( Price );<SPAN 
    class=250152519-26072004>    
    if(IsEmpty(StaticVarGet("PrevPrice"))) <SPAN 
    class=250152519-26072004>    
    StaticVarSet("PrevPrice",CurrentPrice);<SPAN 
    class=250152519-26072004>    
    if(IsEmpty(StaticVarGet("CurrentPrice"))) 
    StaticVarSet("CurrentPrice",CurrentPrice);<SPAN 
    class=250152519-26072004>    PrevPrice = 
    StaticVarGet("PrevPrice");<SPAN 
    class=250152519-26072004>    if( CurrentPrice!= 
    PrevPrice) <SPAN 
    class=250152519-26072004>        
    {<SPAN 
    class=250152519-26072004>        
    StaticVarSet("PrevPrice",CurrentPrice);<SPAN 
    class=250152519-26072004>        
    StaticVarSet("CurrentPrice", PrevPrice );<SPAN 
    class=250152519-26072004>        
    }
    <SPAN 
    class=250152519-26072004>    CurrentPrice= 
    StaticVarGet("CurrentPrice");<SPAN 
    class=250152519-26072004>    PrevPrice = 
    StaticVarGet("PrevPrice");<SPAN 
    class=250152519-26072004>    PriceChange = PrevPrice - 
    CurrentPrice;    
    Plot(CurrentPrice,"\n\nPrevPrice: ",4,1);<SPAN 
    class=250152519-26072004>    Plot(PrevPrice, 
    "\nLastPrice: ",5,1);    
    Plot(PriceChange ,"\nPriceChange: 
    ",1,styleNoLine|styleNoLabel|styleNoRescale);<SPAN 
    class=250152519-26072004>    <FONT 
    size=2>return 
    CurrentPrice;<SPAN 
    class=250152519-26072004>    }
    PlotHorCursorClicks( C );<FONT 
    face="Lucida Console"> // You can 
    substitute another price array for 
    C
    
    
    
    <SPAN 
    class=250152519-26072004> Check 
    AmiBroker web page at:<A 
    href="">http://www.amibroker.com/Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Check AmiBroker web page at:<A 
    href="">http://www.amibroker.com/Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    


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 












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.