Package de.gsi.financial.samples.dos
Class OrderExpression
- java.lang.Object
-
- de.gsi.financial.samples.dos.OrderExpression
-
public class OrderExpression extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOrderExpression.MarketOnPriceMARKET PRICE ENTRY OPEN_PRICE - Enter on open price of actual bar CLOSE_PRICE - Enter on close price of actual bar TEST_PRICE - Enter on specific price of actual bar (for backtest only!), the price has to be specified and included in actual bar, if the price is not included, the close price is taken.static classOrderExpression.OrderBuySellstatic classOrderExpression.OrderTypestatic classOrderExpression.TIFstatic classOrderExpression.TimeInForce
-
Field Summary
Fields Modifier and Type Field Description static OrderExpression.TIFTIF_NEXT_BAR
-
Constructor Summary
Constructors Constructor Description OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity)OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price)OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, OrderExpression.TIF tif)OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, OrderExpression.TIF tif, OrderExpression.MarketOnPrice marketOnPrice)OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, java.lang.Double price2)OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, java.lang.Double price2, OrderExpression.TIF tif)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OrderExpressionbuyLimit(double price, int quantity)BUY LIMITstatic OrderExpressionbuyLimit(double price, int quantity, OrderExpression.TIF tif)BUY LIMIT + TIFstatic OrderExpressionbuyMarket(int quantity)BUY MARKET (on close price)static OrderExpressionbuyMarket(int quantity, OrderExpression.TIF tif)BUY MARKET (on close price) + TIFstatic OrderExpressionbuyMarketInTouch(double price, int quantity)BUY MITstatic OrderExpressionbuyMarketInTouch(double price, int quantity, OrderExpression.TIF tif)BUY MIT + TIFstatic OrderExpressionbuyMarketNextBar(int quantity)BUY MARKET on next barstatic OrderExpressionbuyMarketNextBarOnOpenPrice(int quantity)BUY MARKET on next bar on open pricestatic OrderExpressionbuyMarketOnClose(int quantity)BUY MOCstatic OrderExpressionbuyMarketOnOpen(int quantity)BUY MOOstatic OrderExpressionbuyMarketOnOpenPrice(int quantity)BUY MARKET on open price of actual barstatic OrderExpressionbuyMarketOnOpenPrice(int quantity, OrderExpression.TIF tif)BUY MARKET on open price of actual barstatic OrderExpressionbuyMarketOnTestPrice(int quantity, double price)BUY MARKET (on test price)static OrderExpressionbuyStop(double price, int quantity)BUY STOPstatic OrderExpressionbuyStop(double price, int quantity, OrderExpression.TIF tif)BUY STOP + TIFstatic OrderExpressionbuyStopLimit(double price, double price2, int quantity)BUY STOP LIMITstatic OrderExpressionbuyStopLimit(double price, double price2, int quantity, OrderExpression.TIF tif)BUY STOP LIMIT + TIFOrderExpression.OrderBuySellgetBuySell()OrderExpression.MarketOnPricegetMarketOnPrice()intgetOrderQuantity()OrderExpression.OrderTypegetOrderType()java.lang.DoublegetPrice()java.lang.DoublegetPrice2()OrderExpression.TIFgetTif()static OrderExpressionsellLimit(double price, int quantity)SELL LIMITstatic OrderExpressionsellLimit(double price, int quantity, OrderExpression.TIF tif)SELL LIMIT + TIFstatic OrderExpressionsellMarket(int quantity)SELL MARKET (on close price)static OrderExpressionsellMarket(int quantity, OrderExpression.TIF tif)SELL MARKET (on close price) + TIFstatic OrderExpressionsellMarketInTouch(double price, int quantity)SELL MITstatic OrderExpressionsellMarketInTouch(double price, int quantity, OrderExpression.TIF tif)SELL MIT + TIFstatic OrderExpressionsellMarketNextBar(int quantity)SELL MARKET on next barstatic OrderExpressionsellMarketOnClose(int quantity)SELL MOCstatic OrderExpressionsellMarketOnOpen(int quantity)SELL MOOstatic OrderExpressionsellMarketOnOpenPrice(int quantity)SELL MARKET on open price of actual barstatic OrderExpressionsellMarketOnOpenPrice(int quantity, OrderExpression.TIF tif)SELL MARKET on open price of actual bar + TIFstatic OrderExpressionsellMarketOnTestPrice(int quantity, double price)SELL MARKET (on test price)static OrderExpressionsellStop(double price, int quantity)SELL STOPstatic OrderExpressionsellStop(double price, int quantity, OrderExpression.TIF tif)SELL STOP + TIFstatic OrderExpressionsellStopLimit(double price, double price2, int quantity)SELL STOP LIMITstatic OrderExpressionsellStopLimit(double price, double price2, int quantity, OrderExpression.TIF tif)SELL STOP LIMIT + TIFjava.lang.StringtoString()
-
-
-
Field Detail
-
TIF_NEXT_BAR
public static final OrderExpression.TIF TIF_NEXT_BAR
-
-
Constructor Detail
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity)
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price)
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, OrderExpression.TIF tif)
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, OrderExpression.TIF tif, OrderExpression.MarketOnPrice marketOnPrice)
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, java.lang.Double price2)
-
OrderExpression
public OrderExpression(OrderExpression.OrderBuySell buySell, OrderExpression.OrderType orderType, int orderQuantity, java.lang.Double price, java.lang.Double price2, OrderExpression.TIF tif)
-
-
Method Detail
-
buyMarket
public static OrderExpression buyMarket(int quantity)
BUY MARKET (on close price)
-
buyMarketOnTestPrice
public static OrderExpression buyMarketOnTestPrice(int quantity, double price)
BUY MARKET (on test price)
-
buyMarket
public static OrderExpression buyMarket(int quantity, OrderExpression.TIF tif)
BUY MARKET (on close price) + TIF
-
sellMarket
public static OrderExpression sellMarket(int quantity)
SELL MARKET (on close price)
-
sellMarketOnTestPrice
public static OrderExpression sellMarketOnTestPrice(int quantity, double price)
SELL MARKET (on test price)
-
sellMarket
public static OrderExpression sellMarket(int quantity, OrderExpression.TIF tif)
SELL MARKET (on close price) + TIF
-
buyMarketOnOpenPrice
public static OrderExpression buyMarketOnOpenPrice(int quantity)
BUY MARKET on open price of actual bar
-
buyMarketOnOpenPrice
public static OrderExpression buyMarketOnOpenPrice(int quantity, OrderExpression.TIF tif)
BUY MARKET on open price of actual bar
-
sellMarketOnOpenPrice
public static OrderExpression sellMarketOnOpenPrice(int quantity)
SELL MARKET on open price of actual bar
-
sellMarketOnOpenPrice
public static OrderExpression sellMarketOnOpenPrice(int quantity, OrderExpression.TIF tif)
SELL MARKET on open price of actual bar + TIF
-
buyMarketNextBar
public static OrderExpression buyMarketNextBar(int quantity)
BUY MARKET on next bar
-
buyMarketNextBarOnOpenPrice
public static OrderExpression buyMarketNextBarOnOpenPrice(int quantity)
BUY MARKET on next bar on open price
-
sellMarketNextBar
public static OrderExpression sellMarketNextBar(int quantity)
SELL MARKET on next bar
-
buyMarketOnClose
public static OrderExpression buyMarketOnClose(int quantity)
BUY MOC
-
sellMarketOnClose
public static OrderExpression sellMarketOnClose(int quantity)
SELL MOC
-
buyMarketOnOpen
public static OrderExpression buyMarketOnOpen(int quantity)
BUY MOO
-
sellMarketOnOpen
public static OrderExpression sellMarketOnOpen(int quantity)
SELL MOO
-
buyMarketInTouch
public static OrderExpression buyMarketInTouch(double price, int quantity)
BUY MIT
-
sellMarketInTouch
public static OrderExpression sellMarketInTouch(double price, int quantity)
SELL MIT
-
buyMarketInTouch
public static OrderExpression buyMarketInTouch(double price, int quantity, OrderExpression.TIF tif)
BUY MIT + TIF
-
sellMarketInTouch
public static OrderExpression sellMarketInTouch(double price, int quantity, OrderExpression.TIF tif)
SELL MIT + TIF
-
buyLimit
public static OrderExpression buyLimit(double price, int quantity)
BUY LIMIT
-
sellLimit
public static OrderExpression sellLimit(double price, int quantity)
SELL LIMIT
-
buyLimit
public static OrderExpression buyLimit(double price, int quantity, OrderExpression.TIF tif)
BUY LIMIT + TIF
-
sellLimit
public static OrderExpression sellLimit(double price, int quantity, OrderExpression.TIF tif)
SELL LIMIT + TIF
-
buyStop
public static OrderExpression buyStop(double price, int quantity)
BUY STOP
-
sellStop
public static OrderExpression sellStop(double price, int quantity)
SELL STOP
-
buyStop
public static OrderExpression buyStop(double price, int quantity, OrderExpression.TIF tif)
BUY STOP + TIF
-
sellStop
public static OrderExpression sellStop(double price, int quantity, OrderExpression.TIF tif)
SELL STOP + TIF
-
buyStopLimit
public static OrderExpression buyStopLimit(double price, double price2, int quantity)
BUY STOP LIMIT- Parameters:
price- double for STOP orderprice2- double for LIMIT order
-
sellStopLimit
public static OrderExpression sellStopLimit(double price, double price2, int quantity)
SELL STOP LIMIT- Parameters:
price- double for STOP orderprice2- double for LIMIT order
-
buyStopLimit
public static OrderExpression buyStopLimit(double price, double price2, int quantity, OrderExpression.TIF tif)
BUY STOP LIMIT + TIF- Parameters:
price- double for STOP orderprice2- double for LIMIT order
-
sellStopLimit
public static OrderExpression sellStopLimit(double price, double price2, int quantity, OrderExpression.TIF tif)
SELL STOP LIMIT + TIF- Parameters:
price- double for STOP orderprice2- double for LIMIT order
-
getBuySell
public OrderExpression.OrderBuySell getBuySell()
-
getOrderType
public OrderExpression.OrderType getOrderType()
-
getOrderQuantity
public int getOrderQuantity()
-
getPrice
public java.lang.Double getPrice()
-
getPrice2
public java.lang.Double getPrice2()
-
getMarketOnPrice
public OrderExpression.MarketOnPrice getMarketOnPrice()
-
getTif
public OrderExpression.TIF getTif()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-