Hi Anthony,
Here is a sample script that I could see executing with the click of a toolbar
button. Thanks,
Hdr = "Open,High,Low,Close,LLV,HHV,TradeDir,TimeStamp\r\n";
Line = NumToStr(LastValue(Open),6.2,False) + "," +
NumToStr(LastValue(High),6.2,False) + "," +
NumToStr(LastValue(Low),6.2,False) + "," +
NumToStr(LastValue(Close),6.2,False) + "," +
NumToStr(LastValue(LLV(L, 6)),6.2,False) + "," +
NumToStr(LastValue(HHV(H, 6)),6.2,False) + "," + tradeDir + "," + Now();
fh = fopen("C:\\Documents and Settings\\grose\\My Documents\\NinjaTrader
6.5\\YM-1M.txt", "w");
if ( fh )
{
fputs( Hdr, fh );
fputs( Line, fh );
fclose(fh);
}
else
{
printf("Error opening file");
}
Gordon
----- Original Message -----
From: Anthony Faragasso
To: [email protected]
Sent: Monday, January 26, 2009 11:53 PM
Subject: Re: [amibroker] Adding AFL to toolbar button
Gordon,
If you have some AFL that you would like to attach to a new button...please
post or email me and I will
try it....
Anthony
----- Original Message -----
From: Gordon Rose
To: [email protected]
Sent: Monday, January 26, 2009 11:27 PM
Subject: Re: [amibroker] Adding AFL to toolbar button
Hi Anthony, Herman, and Dennis,
Thank you for your excellent responses.
Anthony, I'm curious -- how did you accomplish what you attached in the
jpg? I wasn't aware of that capability. Also, does the AFL code behind your
button have the ability to access data for the current symbol? If not, I may
need to go with chart buttons.
Dennis, what I'm trying to do is create an order button -- so having it
handy is very important. When I see the conditions I want to see for an order,
I need to calculate some limit values based on price and indicator values on
the immediately prior bar -- the one that just finished painting. The order
isn't part of an automated system -- there is some visual discretion. An order
button that combined access to the current chart data plus the interface of the
broker would be ideal.
Thanks again.
Regards,
Gordon
----- Original Message -----
From: Anthony Faragasso
To: [email protected]
Sent: Monday, January 26, 2009 11:11 PM
Subject: Re: [amibroker] Adding AFL to toolbar button
Gordon ,
I created a couple of buttons on the toolbar that perform explorations
in AA window when pressed...
Attached shows 1 button....
Anthony
----- Original Message -----
From: Gordon Rose
To: [email protected]
Sent: Monday, January 26, 2009 11:43 AM
Subject: [amibroker] Adding AFL to toolbar button
Hi,
Is anyone aware of a way to attach AFL to a toolbar button in AB?
I'd prefer a new toolbar button, and am willing to use win32 coding if
there's a way to do it.
Barring being able to do this, I seem to recall a post about using OLE
automation to execute blocks of script on demand -- I believe it involved using
commentary or notes -- I am going to search to for that and if I find what I
think I'm looking for, I'll post the link in this thread.
Regards,
Gordon
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.13/1916 - Release Date:
1/26/2009 7:08 AM
----------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.13/1916 - Release Date: 1/26/2009
7:08 AM