Alert Format Explanation Video Explanation
Code
{
"symbol": "{{ticker}}",
"date": "{{timenow}}",
"data": "buy",
"quantity": "1",
"risk_percentage": "0",
"price": "{{close}}",
"tp": "0",
"percentage_tp": "0",
"dollar_tp": "2",
"sl": "0",
"dollar_sl": "0",
"percentage_sl": "0",
"trail": "0",
"trail_stop": "0",
"trail_trigger": "0",
"trail_freq": "0",
"update_tp": "false",
"update_sl": "false",
"token":
"Ct8tPtD345345t3fty2EtYtCtVtVtUtL",
"duplicate_position_allow":
"true",
"reverse_order_close": "true",
"multiple_accounts": [
{
"token":
"Ct8tPtD345345t3fty2EtYtCtVtVtUtL",
"account_id": "2",
"risk_percentage": 2,
"quantity_multiplier": 0
}
]
}
Symbol
This would be symbol of Trading View symbol. We would give mapping in setting screen of pickmytrade.trade . When this symbol trade would come it would pick setting based on that symbol and would find out what is Rithmic symbol for that and what is tp and sl setting etc. In case Tradigview alert you can use PlaceHolder {{ ticker }}. In following case when in alert NQM2024 would come then we would place Trade on NQM2 in.
Date
Is used to identify duplicate alert in case of Tradingview alert you can use placeholder "{{timenow}}".
data
We support following direction
- Buy
- Sell
- Close
To Automate Trading View Strategy to Rithmic you need to send following {`"{{strategy.order.action}}"`}
- Buy and Sell would open new position
- Close would close open position and cancel open orders as well. We need to send same for both Buy and Sell alert.
To link TradingView Indicator to Rithmic, you need to use all 3 actions: Buy, Sell, and Close. In total, you need to create 4 alerts in TradingView if you want to automate long and short trades.
quantities
you can give quantity in absolute no of contract you want to buy or sell for this alert
risk_percentage
it could be used to calculate quantity based on Rithmic account value and stop loss for your trade. In case you set that than pass quantity as 0 and stop loss value should be passed. it calculate quantity = ((account_value_in_Rithmic X risk_percentage)/100) / abs(sl price-entry price)/ lotsize
price
This is used at two places first in case setting you configured order type as LMT then it would place limit price as price and another it used to calculate if risk_percentage is set. In case of Trading view alert you are using for automation then pass {close}} price. This way trading view alert would have current price.
tp
This is used to place take profit price from TradingView . TradingView gives you options to access Plot variable in alert using {{plot_0}},{{plot_1}} etc. You can read more about this on Trading view .
dollar_tp
This is used to place Take profit based on Dollar value. It would
calculate Take profit price based on Fill Price in TradingView .
let’s understand from this one example. Let’s say you placed Buy
entry trade from TradingView, and it get placed as entry price of
18000 and in that case you take profit order would be passed as
Limit order of 18010.
This would add or subtract from filled price on Rithmic for entry
order. Actual profit value would be different in your Rithmic
account since we added dollar in price and it would be multiplied
with lot size.
percentage_tp
This is used to place Take profit based on filled price . It would
calculate Take profit from price received from trading view and then
calculate percentage and then add that value in filled price. let’s
understand from this one example. Let’s say you placed Buy entry
trade from TradingView, and it get placed as entry price of 18000
and it filled with 18001 and in that case, you take profit order
would be passed as Limit order of Actual filled price +((price
received from Trading AletX percentage_tp)/100) .
You
can pass percentage_tp in decimal as well like 0.1,0.001,1,2 etc.
This would add or subtract from filled price on
Rithmic for entry order. Actual profit value would be different in
your Rithmic account since we added dollar in price and it would
be multiplied with lot size to calculate total profit on that
contract .
sl
This is used to place stop loss price from TradingView when connecting Trading view to Rithmic . TradingView gives you options to access Plot variable in alert using {{plot_0}},{{plot_1}} etc. In case you pass sl or tp value we would place that as bracket order on Rithmic.
dollar_sl
This is used to place Stop loss based on Dollar value. It would
calculate Stop loss price based on Fill Price in TradingView . let’s
understand from this one example. Let’s say you placed Buy entry
trade from TradingView, and it get placed as entry price of 18000
and in that case you take profit order would be passed as Limit
order of 17990.
This would add or subtract from filled
price on Rithmic for entry order. Actual loss value would be
different in your Rithmic account since we added dollar in price
and it would be multiplied with lot size to calculate actual Loss in
Rithmic Account.
percentage_sl
This is used to place Stop loss based on filled price . It would
calculate Stop loss from price received from trading view and then
calculate percentage and then add that value in filled price. let’s
understand from this one example. Let’s say you placed Buy entry
trade from TradingView, and it get placed as entry price of 18000
and it filled with 18001 and in that case, you take stop loss order
would be passed as Stop order of Actual filled price - ((price
received from Trading AletX percentage_tp)/100) .
You can pass percentage_sl in decimal as well like
0.1,0.001,1,2 etc.
This would add or subtract from filled price on Rithmic for
entry order. Actual loss value would be different in your Rithmic
account since we added dollar in price and it would be multiplied
with lot size to calculate total loss on that contract .
trail_stop
Trailing distance relative to the current price. This we pass in $ . in case you pass there 10 and your price is 100 when trail trigger it would placed stop loss at 90 for sell order .
trail_trigger
Amount of profit in price-value before the auto-trail converts your stop to a trailing stop. If you set 100 then one you get 100$ profit then trail is going to trigger.
trail_freq
the amount of change that must occur before the trailing stop will move, or the granularity of updates. If set to the instrument tick size, this will cause the stop to move on every positive tick ("positive" relative to your current position). This would be passed in USD.
token
you need to pass your account token here which you can get for there . Don’t share this with anyone. Since this is unique to you for trade.
duplicate_position_allow
it can have value as true or false if it’s false it would not allow same position to be created again. Let’s say if you have buy position and you again get alert for buy then it would ignore new alerts and if you set it true then it would allow to create that in Rithmic
reverse_order_close
it can have value as true or false. you have buy position and sell open order and you get alert for sell it would close open orders and close position as well. In case it’s value is set as True and if it’s false then it would not change existing open orders and positions.
update_tp
in case you pass that as True and Pass value in tp then it would not open new trade but it would updated earlier opened trade take profit . This would be only used in Tradingview Indicator .
update_sl