Conditional Orders - rapmd73/JackrabbitRelay GitHub Wiki

Conditional Orders

This document details the conditional order framework provided by Jackrabbit Relay.

A Conditional order is an order where only the buying oder is given. The order provides the take profit (pips or percentage) and stop loss (pips or percentage) by which Oliver Twist will manage the order.

Conditional Payload Synopsis

Along with the various required order information, conditional orders have the following elements.

Property Name Description
Conditional This is what tells the system that THIS order is conditional.
ConditionalOneShot This item tell Relay that only ONE position is allowed for this assest.
EnforceFIFO Required if you want to sell individual trades in an unbounded grid style technique. Forex ONLY.
Direction Long/Short. You must exlicitly tell Oliver Twist which way you want this trade to go.
SellAction How should this asset be managed? Close will sell ALL trades in this position.
TakeProfit The desired take profit, eith as pips ("5p"), percentage ("1%"), or and absolute price ("9.49875").
StopLoss The desired stop loss in the same format as take profit (pips, percentage, absolute price).

Examples Conditional Order

Here is what a conditional order ayload would look link. Comment and Link are not required, but very helpful, especially in tracing issues.

Example for a cryprocurreny exchange

This example demonstrates where Oliver Twist will manage multiple orders. Be aware the cryprocurrency exchanges use AVERAGES only, so you will see situations where your wallet does not have enough for a specific order, subsequently purging it. You can use "ConditionalRepurchase":"Yes" (experimental) in your exchange config file to tell the system to repurchase the amount at a better price then the original.

{
  "Comment1","Standard order information",
  "Action":"Buy",
  "Exchange":"kucoin",
  "Account":"MAIN",
  "Asset":"BTC/USDT",
  "USD":"20",
  "Link":"https://www.tradingview.com/chart/L0ejIBsJ/",
  "Comment1":"Conditional order entries",
  "Conditional":"Yes",
  "Direction":"Long",
  "SellAction":"Sell",
  "TakeProfit":"1%",
  "StopLoss":"20%",
  "Identity":"YourIdentityString"
}

This example demonstrates the most effective and profitable way to trade on a cryptocurrency exchange. It allows only ONE position of the asset at a time. I have spent 2 years testing and researching this to know that a single position (non-accumulation technique) is the most profitable way of trading.

{
  "Comment1","Standard order information",
  "Action":"Buy",
  "Exchange":"kucoin",
  "Account":"MAIN",
  "Asset":"{{ticker}}",
  "USD":"20",
  "RemapSymbol":"Yes",
  "Link":"https://www.tradingview.com/chart/L0ejIBsJ/",
  "Comment1":"Conditional order entries",
  "Conditional":"Yes",
  "ConditionalOneShot":"Yes",
  "Direction":"Long",
  "SellAction":"Sell",
  "TakeProfit":"1%",
  "StopLoss":"20%",
  "Identity":"YourIdentityString"
}

Example for OANDA

{
  "Comment1","Standard order information",
  "Action":"Buy",
  "Exchange":"oanda",
  "Account":"FrenchVanilla",
  "Asset":"EURUSD",
  "Units":"-1",
  "RemapSymbol":"Yes",
  "Link":"https://www.tradingview.com/chart/L0ejIBsJ/",
  "Comment1":"Conditional order entries",
  "Conditional":"Yes",
  "EnforceFIFO":"Yes",
  "Direction":"Short",
  "SellAction":"Sell",
  "TakeProfit":"5p",
  "StopLoss":"161p",
  "Identity":"YourIdentityString"
}