Class FuturesBacktestingAccount
java.lang.Object
io.runon.trading.backtesting.account.FuturesBacktestingAccount
- All Implemented Interfaces:
io.runon.trading.account.Account,io.runon.trading.account.FuturesAccount
public class FuturesBacktestingAccount
extends Object
implements io.runon.trading.account.FuturesAccount
선물백테스팅 거래 계좌
레버리지 1배고정
- Author:
- macle
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigDecimalprotected BigDecimalprotected final Stringprotected BigDecimalprotected intprotected intprotected BigDecimalprotected SymbolPrice -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCash(BigDecimal cash) voidbuy(String symbol, BigDecimal buyCash, BigDecimal price) voidbuyPrice(BigDecimal price, BigDecimal quantity) voidclosePrice(io.runon.trading.account.FuturesPositionData futuresPosition) closePrice(String symbol) getAvailableBuyPrice(String symbol) getAvailableSellPrice(String symbol) getCash()getId()getLeverage(String symbol) io.runon.trading.account.FuturesPositiongetPosition(String symbol) intgetQuantityPrecision(String symbol) io.runon.trading.strategy.PositiongetSymbolPosition(String symbol) voidlongClose(String symbol, BigDecimal orderPrice, BigDecimal price) voidvoidsell(String symbol, BigDecimal sellCash, BigDecimal price) voidsellPrice(BigDecimal price, BigDecimal quantity) voidsetBuyFee(BigDecimal buyFee) 구매 수수료 설정voidsetCash(BigDecimal cash) voidsetFee(BigDecimal fee) 수수료 설정 구매수수료와 판매수수료가 같은경우 다른경우는 각각 설정voidsetLeverage(String symbol, BigDecimal leverage) voidsetMinPrice(BigDecimal minPrice) voidsetPriceScale(int priceScale) voidsetQuantityPrecision(String symbol, Integer quantityPrecision) voidsetScale(int scale) AmountType DECIMAL 일떄만 사용voidsetSellFee(BigDecimal sellFee) 판매수수료 설정voidsetSymbolPrice(SymbolPrice symbolPrice) voidshortClose(String symbol) shortClose(String symbol, BigDecimal orderPrice, BigDecimal price)
-
Field Details
-
cash
-
id
-
positionMap
-
symbolPrice
-
minPrice
-
symbolQuantityPrecision
-
scale
protected int scale -
priceScale
protected int priceScale -
buyFee
-
sellFee
-
-
Constructor Details
-
FuturesBacktestingAccount
-
FuturesBacktestingAccount
public FuturesBacktestingAccount()
-
-
Method Details
-
setCash
-
addCash
-
setSymbolPrice
-
setMinPrice
-
setQuantityPrecision
-
getQuantityPrecision
-
setScale
public void setScale(int scale) AmountType DECIMAL 일떄만 사용- Parameters:
scale- default 6
-
setPriceScale
public void setPriceScale(int priceScale) -
setBuyFee
구매 수수료 설정- Parameters:
buyFee- 구매수수료
-
setSellFee
판매수수료 설정- Parameters:
sellFee- 판매수수료
-
setFee
수수료 설정 구매수수료와 판매수수료가 같은경우 다른경우는 각각 설정- Parameters:
fee- 수수료
-
order
-
buyAll
-
buy
-
sellAll
-
sell
-
close
-
shortClose
-
shortClose
-
buyPrice
-
sellPrice
-
longClose
-
longClose
-
closePrice
-
closePrice
-
getId
- Specified by:
getIdin interfaceio.runon.trading.account.Account
-
getAssets
- Specified by:
getAssetsin interfaceio.runon.trading.account.Account
-
getCash
- Specified by:
getCashin interfaceio.runon.trading.account.Account
-
getPosition
- Specified by:
getPositionin interfaceio.runon.trading.account.FuturesAccount
-
setLeverage
- Specified by:
setLeveragein interfaceio.runon.trading.account.FuturesAccount
-
getLeverage
- Specified by:
getLeveragein interfaceio.runon.trading.account.FuturesAccount
-
getAvailableBuyPrice
- Specified by:
getAvailableBuyPricein interfaceio.runon.trading.account.FuturesAccount
-
getAvailableSellPrice
- Specified by:
getAvailableSellPricein interfaceio.runon.trading.account.FuturesAccount
-
getSymbolPosition
-