mjvj55
1
how do i send the Qty that is calculated dynamically in my AFL to another program which places the orders to the broker terminal.
For Ex: Buy signal is provided by the AFL which is captured by another program as in - buy = ExRem( buy, sell );
Kindly let me know how qty can be sent in a number format without decimals.
Tomasz
2
Formatting of numbers, see AFL function reference:
http://www.amibroker.com/f?strformat
http://www.amibroker.com/f?numtostr
So you can write
qty = 123;
string_with_no_decimals = StrFormat("%.0f", qty ); // 0 decimal places
string_with_no_decimals2 = NumToStr( qty, 1.0 ); // 0 decimal places
1 Like