Buy the specified spread.
Buy the specified spread. To set the quantity, use the sizeBy () method
var ndx = this.getSecurity("^NDX") val butterfly = ndx.strategies.butterflies.IronButterfly butterfly.buy().sizeBy.risk(targetRisk=10000)
Buy the spread.
Buy the spread. Specify an orderID in order to reference this position in the future. To set the quantity, use the sizeBy method.
To reference position using the orderID, use the selectPosition() API.
var ndx = this.getSecurity("^NDX") val butterfly = ndx.strategies.butterflies.IronButterfly butterfly.buy ("MyButterfly", "MyComments").sizeBy.risk(targetRisk=10000) this.selectPosition("MyButterfly");
Rank all matching spreads by criteria such as cost, risk / reward, etc.
Rank all matching spreads by criteria such as cost, risk / reward, etc..
Select the prior position to close.
Select the prior position to close. Roll into this new position after prior position is closed. If prior position is already closed, no rolling will take place.
Select the entire position in order to add specific criteria for overall position.
Select the entire position in order to add specific criteria for overall position.
Certain metrics will change based on the size of the position. For example, max risk / max reward / option greeks will scale up or down based on the size of the position.
If you don't want these metrics to be affected by the size of the position, set "scaleByQuantity=false"
If scaleByQuantity = false, metrics will be evaluated assuming quantity is 1.
Otherwise, metrics will be evaluated based on full position size.
Select the Top N matching spreads based on the "rankBy" criteria used.
Select the Top N matching spreads based on the "rankBy" criteria used. Default is to select only the top (N=1)
Sell the specified spread.
Sell the specified spread. To set the quantity, use the sizeBy () method
var ndx = this.getSecurity("^NDX") val butterfly = ndx.strategies.butterflies.IronButterfly butterfly.sell().sizeBy.risk(targetRisk=10000)
Sell / short the spread.
Sell / short the spread. Specify an orderID in order to reference this position in the future. To set the quantity, use the sizeBy method.
To reference position using the orderID, use the selectPosition() API.
var ndx = this.getSecurity("^NDX") val butterfly = ndx.strategies.butterflies.IronButterfly butterfly.sell ("MyButterfly", "MyComments").sizeBy.risk(targetRisk=10000) this.selectPosition("MyButterfly");
Set the maximum number of open positions of this particular type of order
Set the maximum number of open positions of this particular type of order
Size all matching spreads by cost, risk, margin, etc.
Size all matching spreads by cost, risk, margin, etc..
Buy the spread.
Buy the spread. Quantity is ignored if specific "sizeBy" criteria are defined.
Buy the spread.
Buy the spread. Specify an orderID in order to reference this position in the future. Quantity is ignored if specific "sizeBy" criteria are defined.
To reference position using the orderID, use the selectPosition() API.
val cc = ndx.strategies.withStock.CoveredCall cc.buy(quantity=10,orderID="vertical1001",comments="Enter CoveredCall When 50 Day MVG crosses above 200 Day MVG") ..... ..... // select the covered call order using the orderID val coveredCall = this.selectPosition(orderID="vertical1001")
Select the entire position in order to add specific criteria for overall position.
Select the entire position in order to add specific criteria for overall position.
Certain metrics will change based on the size of the position. For example, max risk / max reward / option greeks will scale up or down based on the size of the position.
By default, computation will be evaluated based on full position size.
Sell / short the spread.
Sell / short the spread. Quantity is ignored if specific "sizeBy" criteria are defined.
Sell / short the spread.
Sell / short the spread. Specify an orderID in order to reference this position in the future. Quantity is ignored if specific "sizeBy" criteria is defined.
To reference position using the orderID, use the selectPosition() API.
val cc = ndx.strategies.withStock.CoveredCall cc.sell(quantity=10,orderID="vertical1001",comments="Enter CoveredCall When 50 Day MVG crosses above 200 Day MVG") ..... ..... // select the covered call order using the orderID val coveredCall = this.selectPosition(orderID="vertical1001")