PureBytes Links
Trading Reference Links
|
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
------------------------ 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/
|