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

[amibroker] Recent changes to IB calls?



PureBytes Links

Trading Reference Links

Hi,

Until yesterday the following code reported correctly short and long
positions. Now is sending orders even if position is negative. Any clues?

if( Position > 0 )

              Sz= ibc.getpositionsize(Name());

          {

                     // retrieve orderID from previous run, will be empty if
no order was placed before   

              stopOrderID = StaticVarGetText("OrderID"+Name()); 

 

                     // place or modify the order - don't transmit yet 

              OrderID = ibc.ModifyOrder( OrderID, Name(), "SELL", sz*2,
"LMT", Prss, 0, "Day", True );

 

              // store orderID for next run so we know which order to modify


              StaticVarSetText("OrderID"+Name(), OrderID); 

              } 

 


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/594 - Release Date: 12/20/2006 3:54 PM