Archiv der Kategorie: TWSLink

Neue empfohlene Version der der Interactive Brokers Traders Workstation (TWS 972)

Wir entschuldigen uns für die erneute Änderung der Empfehlung.  Portfolio Daten werden mit dieser Version korrekt wieder gegeben.

 

Nutzer neuerer Versionen, die keine Probleme haben, sollten bei diesen bleiben.

 

Der Vorzug dieser Version ist es,  daß das automatische Logoff verhindert werden kann durch Verwebung des IBController (und IBStarter, einer GUI für IBController).

 

Herunterladen der empfohlenen Trader Workstation (Version 972)

 

Herunterladen des empfohlenen IB Gateway (Version 972)

Order increases leveraged FX position

Wenn sie trade-commander.com Software in Verbindung mit einem Interactive Brokers Konto verwenden,  dann läuft ihnen eventuell diese Fehlermeldung über den Weg,  wenn sie eine Order plazieren wollen.

Order increases leveraged FX position

 

Der Grund liegt vielleicht in einem unzureichenden Margin.  Gehen sie in das Konto Management (Webmaske) einzuloggen und fordern sie angehobene Forex Erlaubnis an (leveraged forex permissions).

Perl 5 x64 wrapper for TWSLink

Python 5 x64 wrapper for TWSLink along with Visual Studio wrapper solution and sample

  • 64 bit twslink2pl.dll and twslink2pl.pm included.
  • Visual Studion 2017 solution file included: This is to create your own twslink2 wrapper for other perl versions.
  • Includes also a small sample in the test folder of download.

 

When the TWSLink2 interfaces should change, which is unlikely, or a new Perl version is out which you want to use, you may want to have a new TWSLink2 wrapper,
so you can call TWSLink from within Perl. In order to build your own wrapper, you need some tools:

The Visual Studio project for this perl wrapper, assumes that swig is in c:\swig. Details about building the wrapper are in the readme.txt of download.

Note: With swig, Visual Studio and TWSLink2 wrapper cpp files (contained in download), you can build wrapper for ANY LANGUAGE contained in the swig world. Just watch the samples in the swig project, to get an idea and use the Perl wrapper Visual Studio project as draft.

View sample code

# --- including libs ---
# twslink module
use twslink2pl;
# module to modify console
#use Win32::Console;


# ----- Object creation -----
print "creating twslink wrapper:\n";
$tws = new twslink2pl::TWSLink2Wrap("",1);
#print "creating console:\n";
#$console = new Win32::Console;

#$tws->Load(true,"");
my $stime=gmtime();
print "start time=$stime\n";

print "Connecting . . . \n" ;
$status = $tws->CONNECT("127.0.0.1",7496,1,6000) ;
print "Connected=$status\n";
# register a stock; wait at the most 5 seconds until contract has been accpeted by tws


print "Register MSFT\n";
my $uidMSFT = $tws->REGISTER_CONTRACT("MSFT","STK","USD","NASDAQ","","","",0.0,"",0,0.0) ;
print "uid MSFT=$uidMSFT\n";

print "Place buy market 100 MSFT\n";
my $uidOrderMSFT = $tws->PLACE_ORDER($uidMSFT,0,"BUY","MKT",100,0.0,0.0,"GTC",1,0) ;
print "uid order MSFT=$uidOrderMSFT\n";
$tws->WAIT_FOR_FILLED($uidOrderMSFT,20000);

[ddownload id=”1869″ style=”link” text=”Download TWSLink Perl 5 x64 wrapper”]

TWSLink new version 2.3.0.1

A new TWSLink version has been uploaded.

  • Bugfix: Adaptive Orders bug fixed.
  • Change: Log extended to record adaptive order attributes.

 

[ddownload id=”281″ style=”link” text=”Download TWSLink 2.3.0.1″]

 

Batch command example adaptive order for TWSLinkBaTe

int uidc=REGISTER_CONTRACT("NVDA","STK","USD","SMART","","","",0,"",0,0)
CONNECT("",7496,0,10000)
int uido=PLACE_ORDER(uidc,0,"BUY","LMT",100,186.00,0.0,"DAY",-1,0)
// set rth hours only
SET_ORDER_VAL(uido,14,"0",-1)
// set adaptive order algorithm name
SET_ORDER_VAL(uido,67,"Adaptive",-1)
// set adaptive order parameter and transmit order to IB
SET_ORDER_VAL(uido,68,"adaptivePriority=Normal",1)

Download bacth file TWSLinkBaTe