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

RE: [amibroker] Access Data on a Network Drive?



PureBytes Links

Trading Reference Links

Thanks, dingo. Your server-client explanation was helpful. But I have 
not been able to save the added code to my existing parameters.afl 
file without getting an AFL syntax error. Where Herman has

function SS(FileName,String)

I've tried

function SS(parameters.afl,TestNumber)

also

function SS("parameters.afl","TestNumber")

and

function SS(parameters.afl,"TestNumber")

all with the same error. The context menu help screens haven't been 
of any assistance in that regard. What should I enter in the place of 
String and FileName? And I assume FileName in the RSI and ATR files 
should also be parameters.afl?

Obviously I need some basic education on JavaScript, VBScript, or 
whatever language this stuff is borrowed from. The help files in 
AmiBroker assume a level of knowledge that I don't quite possess at 
present. Any suggestions on books?

I appreciate all your efforts and apologize for being such a pain.

Ned




--- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> wrote:
> H's code will do what you want but you need to learn what its doing 
so you
> can modify it. Its not that complicated, really.
>  
> There are 2 pieces:  One containing a param statement and the other 
not.
>  
> the one containing the param statement and the SS function is 
the "server"
> and the one with the RS Function goes into as many other indicators 
as you
> wish and are the "clients".
>  
> This is the way it works:
>  
> After you change the param in indicator with the server code it 
will write
> the new value out to disk via the call to the SS function.
>  
> The client code will go into all of the other indicators that you 
want
> driven by the server. When they refresh they will read the file and 
will
> assign the value stored in that file to the variable used in the 
indicator.
>  
> d
> 
> 
>   _____  
> 
> From: recce101 [mailto:ned@x...] 
> Sent: Thursday, July 01, 2004 3:07 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Global Parameter??
> 
> 
> To better understand the issue and responses to this point, I have 
> constructed three simple test files (Dimitris' description of what 
> I'm trying to accomplish is exactly correct).
> 
> Save the file Parameters.afl in ...AmiBroker\AFL\Include:
> 
> /* -- Parameters -- */
> 
> TestNumber=16;
> 
> TestPeriod=Param("TestPeriod",10,5,20,1);
> 
> Title="\\c55"
> +Name()
> +"\\c33    Parameters"
> +"\\c55    TestNumber: "
> +WriteVal(TestNumber,1.2)
> +"    TestPeriod: "
> +WriteVal(TestPeriod,1.0);
> 
> Save the file TestRSI.afl in ...AmiBroker\AFL:
> 
> /* -- TestRSI -- */
> 
> #pragma nocache
> #include<Parameters.afl>
> 
> Plot(RSI(TestPeriod),"RSI",colorBrightGreen,styleLine);
> 
> Title="\\c55"
> +Name()
> +"\\c33    TestRSI"
> +"\\c55    TestNumber: "
> +WriteVal(TestNumber,1.2)
> +"    TestPeriod (for graph): "
> +WriteVal(TestPeriod,1.0);
> 
> Save the file TestATR.afl in ...AmiBroker\AFL:
> 
> /* -- TestATR -- */
> 
> #pragma nocache
> #include<Parameters.afl>
> 
> Plot(ATR(TestPeriod),"ATR",colorPink,styleLine);
> 
> Title="\\c55"
> +Name()
> +"\\c33    TestATR"
> +"\\c55    TestNumber: "
> +WriteVal(TestNumber,1.2)
> +"    TestPeriod (for graph): "
> +WriteVal(TestPeriod,1.0);
> 
> Now, with all three visible on the same screen, note that the 
TestRSI 
> and TestATR panes display the TestNumber value of 16.00 and the 
> graphs reflect the default TestPeriod value of 10, all picked up 
from 
> the Parameters.afl file.
> 
> If the TestNumber value of 16 hard-coded in Parameters.afl is 
changed 
> to (say) 21 and Parameters.afl is SAVED, the TestNumber value in 
each 
> indicator pane updates to 21.00 immediately.
> 
> But if the Parameters pane is right-clicked and the TestPeriod 
slider 
> is moved to (say) 15, only the TestPeriod read-out in Parameters 
> changes to 15. Even re-saving Parameters.afl at this point has no 
> effect on the TestRSI or TestAFL graphs, both of which remain on 
the 
> default 10. However, if either TestRSI or TestAFL is right-clicked, 
a 
> parameters slider appears and any changes will immediately update 
> that pane, but that pane only.
> 
> I would like to be able to right-click just one of the panes, 
either 
> Parameters or, if it's not really necessary for Parameters to be 
> displayed, either the RSI or ATR pane, and have both graphs respond 
> immediately to any TestPeriod change.
> 
> For Herman: Thanks for the detailed response, but I wasn't able to 
> follow everything you wrote and I don't completely understand which 
> of your generic "example" statements would need to be replaced by 
> my "actual" data. If your code would accomplish what I'm trying to 
> do, and you have the time, it would be great if you could modify my 
> test files accordingly so I can copy-paste and take it from there.
> 
> Many thanks to everyone!
> 
> Ned
> 
> 
> 
> 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=129omg465/M=295196.4901138.6071305.300117
6/D=gr
> 
oups/S=1705632198:HM/EXP=1088795285/A=2128215/R=0/SIG=10se96mf6/*http:
//comp
> anion.yahoo.com> click here	
>  
> <http://us.adserver.yahoo.com/l?
M=295196.4901138.6071305.3001176/D=groups/S=
> :HM/A=2128215/rand=686503035> 	
> 
> 
>   _____  
> 
> 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 --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/