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

Re: [amibroker] Re: [AmiBroker-at] Has anyone done an AT type system like this? - Moderator pls delete my replies for this thread



PureBytes Links

Trading Reference Links

Dingo,
 
Pls see my starting line...."on something like that." Man , folks are so worried about logistics rather than understanding the basic reason why we are here."TO SHARE IDEAS".
 
 I have noticed and seen many good responses by posting to TWO RELEVANT amibroker groups.  There are quite a few in the "big forum" who have had good ideas on AB as well as AT related.
 
bottomline, Sorry if you feel that YOUR THREAD has been "hijacked". I will request the moderator to delete both my replies.
 
I will start a new thread.
 
Cheers,Padhu
 
 
 
----- Original Message -----
From: dingo
Sent: Sunday, September 16, 2007 11:37 AM
Subject: RE: [amibroker] Re: [AmiBroker-at] Has anyone done an AT type system like this?

I appreciate your repsonse BUT please don't cross post this to other forums. There is no need for that and it winds up in broken threads.  My post was in the AT forum and this wound up in the big forum.  Plus by altering the question I had posted (Regarding using IB) you have now hijacked my thread. Don't do that either!
 
d


From: amibroker@xxxxxxxxxps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Padhu
Sent: Sunday, September 16, 2007 12:26 PM
To: AmiBroker-at@yahoogroups.com; amibroker@xxxxxxxxxps.com
Subject: [amibroker] Re: [AmiBroker-at] Has anyone done an AT type system like this?

Hello,
 
 
I am currently working on something like that. Basically Amibroker will generate the csv order file and I have hired a programmer who is writing a csv bridge to feed this order into metatrader for Forex.
 
But I am having issues with the file functions in AA Scan mode. I could see the orders being sent to the text file when I use as indicator, however when I run in AA mode, they are NOT writing to file.
 
Below is the code.
 

//// Export Trade Signals to an order and Log file...............

/////////////////// Buy Automation

fileischanged = 0;

if (LastValue(Cover) == 1 ) {

mvOrderOIF =

Broker_Symbol+

","+ "BUYSTOP" +

","+ 2 +

","+ (High+Entry_Offset_For_ScalperTrades) +

","+0+

","+ (Low-Stop_Offset_For_ScalperTrades) +

","+ (High+-EXIT_Offset_For_ScalperTrades) +

"," + "Scalper1_Buy" +

"," + "0";

mvOrderOIFLog =

Broker_Symbol+

","+ "BUYSTOP" +

","+ 2 + "Lots " +

","+ (High+Entry_Offset_For_ScalperTrades) +

","+0+

","+ (Low+Stop_Offset_For_ScalperTrades) +

","+ (High+-EXIT_Offset_For_ScalperTrades) +

"," + "Scalper1_Sell" +

"," + "0"

+ Date() +","+WriteVal(Close ,1.4) +"\n";

 

filepath="C:\\Program Files\\Amibroker\\AFL\\PADHU\\AT\\order.txt";

filehandle=fopen(filepath, "w");

fputs(mvOrderOIF, filehandle);

fclose(filehandle);

filepath="C:\\Program Files\\Amibroker\\AFL\\PADHU\\AT\\order_log.txt";

filehandle=fopen(filepath, "a");

fputs(mvOrderOIFLog, filehandle);

fclose(filehandle);

 

fileischanged=1;

};

/////////////////// Buy Automation

//pair, operation, lots, price, slippage, SL, TP, comment (or NULL), expiration (or zero).

fileischanged = 0;

if (LastValue( Short) == 1 ) {

mvOrderOIF =

Broker_Symbol+

","+ "SELLSTOP" +

","+ 2 +

","+ (Low-Entry_Offset_For_ScalperTrades) +

","+0+

","+ (High+Stop_Offset_For_ScalperTrades) +

","+ (Low-EXIT_Offset_For_ScalperTrades) +

"," + "Scalper1_Sell" +

"," + "0";

mvOrderOIFLog =

Broker_Symbol+

","+ "SELLSTOP" +

","+ 2 + "Lots " +

","+ (Low-Entry_Offset_For_ScalperTrades) +

","+0+

","+ (High+Stop_Offset_For_ScalperTrades) +

","+ (Low-EXIT_Offset_For_ScalperTrades) +

"," + "Scalper1_Sell" +

"," + "0"

+ Date() +","+WriteVal(Close ,1.4) +"\n";

 

filepath="C:\\Program Files\\Amibroker\\AFL\\PADHU\\AT\\order.txt";

filehandle=fopen(filepath, "w");

fputs(mvOrderOIF, filehandle);

fclose(filehandle);

filepath="C:\\Program Files\\Amibroker\\AFL\\PADHU\\AT\\order_log.txt";

filehandle=fopen(filepath, "a");

fputs(mvOrderOIFLog, filehandle);

fclose(filehandle);

 

fileischanged=1;

};

==============================================

 
 
 
 
 
 
 
 
 If anyone has any ideas why Amibroker won't write to file in AA Scan mode but does in Indicator mode applied to chart?. Thanks.
 
Cheers,Padhu
 
----- Original Message -----
From: dingo
Sent: Wednesday, September 12, 2007 1:06 PM
Subject: [AmiBroker-at] Has anyone done an AT type system like this?

I'd like to see a "simple" AT system for EOD type trading where a file of
tickers, Action (buy, sell, Short, Cover, stop), position sizes in dollars,
etc. has been created by an AFL the prior evening and it is this programs
job to read in that file and then pass the appropriate info to IB.

If anyone has any code along these lines I'd sure like to see it if you're
willing to share.

d

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___