Welcome to the Tradovate command examples page.
Here you will find some Commands/Parameters that can help you start trading in Tradovate with Autoview.
Keep in mind that most of these can be done using the handy Syntax Builder!
If this article is missing something you feel should be added, feel free to make a suggestion under this page so we can add it for future reference.
Note: Tradovate has now been restricting price data to some users. So you may now need to add
ps=position so that Autoview bases all of the prices off of your average rather than fetching the last price. Alternatively, using fixed parameters like
fsl= so you pass the exact price to avoid us fetching the latest.
Here we will cover some of the Parameters that we will be using to set up some basic trades for Tradovate using Autoview.
Used for pinpointing what exchange you are trading on. In this case you have 2 options.
Tradovate and Tradovate Simulation.
Use Tradovate for live trades and Tradovate Simulation to test your trading strategies before entering a live market.
"s=" is used whenever you are referencing an asset you want to trade. This symbol can be copied from the website to ensure you are getting the proper asset you want.
Standard Buy, Sell, Long and Short options.
b=buy (Spot Trading)
b=sell (Spot Trading)
b=long (Margin Trading)
b=short (Margin Trading)
Cancel and Close All [c=all]
The amount to undercut (negative) or overcut (positive) the top order of the book.
When using this, enter the appropriate amount for the asset you are trading.
In some cases you may see a negative input [Ex: p=-1%]. It is only relevant to your take profit, as a negative, when closing a short position.
p=20% (Price based off a percentage)
p=120 (Price based off of a number)
b=buy p=-1% (Place buy 1% below the current price)
b=sell p=20 (Place sell $20 above the current price)
The portion of your wallet balance or position you would like to effect.
q=10% (Price based off a percentage)
q=50 (Price based off of a number)
Order Type [t=]
There are Various order types that can be used within your command to select what type of trade you want.
t=limit (Limit: Order will be placed in the books to await being filled)
t=market (Market: Place order in the book for immediate filling (
t=post (Post: If any part of the order would have executed, it will be cancelled instead)
t=fok (FOK: Fill Or Kill orders will either completely fill or be aborted)
t=ioc (IOC Immediate Or Cancel orders can be partially or completely filled, but any remaining portion is cancelled.
t=close (Close / Open Can be used together with
c=orderfor specific order types)
t=settle (Settle (Kraken) Settle position(s) at the original order price. Learn more)
t=stop (Stop (OANDA, OANDA Practice) Stop Order request)
One Cancels the Other [oco=]
A conditional order that combines a limit order with a stop-limit order.
We use OCO orders to trade retracements and breakouts. If you wanted to trade a break above resistance or below support, you could place an OCO order that uses a buy stop and sell stop to enter the market.
When using this command, 1 simply means true and tells Autoview to place an OCO order.
One Sends the Other [oso=]
You can use an order-sends-order to make entry and exit points with one order. For example, a buy limit order may be placed on a stock at a level that is 5% below the current market with an OSO condition that if this first order is filled, a second limit order to sell be placed at a level 10% above that buy
When using this command, 1 simply means true and tells Autoview to place an OSO order
Trigger Price [px=]
px= sets the trigger price for the stop-limit you place. You can use a percentage value or a set number value.
In some cases you will want to use px to take profit, for this you would use minus symbol (-).
Example: px=-1% (One percent representing the take profit price you would want)
px=-1% (Sets the take profit price)
Fixed Trailed Stop [fts=]
Used to set a fixed trailing stop in your market order.
fts=2048.04 (Sets your fixed price)
Below will be a set of examples using some of the parameters mentioned above.
We will be stringing some of them together to form different types of orders.
These examples should help you get started with opening basic and or advanced orders in Tradovate with Autoview/TradingView.
We will be using Tradovate Simulation for the exchange type in these examples.
If you wish to trade using the Live markets use e=tradovate
Open a long/short limit
e=tradovatesim s=znh2 b=long q=10% fp=140.6562
e=tradovatesim s=znh2 b=long q=10% p=10%
e=tradovatesim s=znh2 b=short q=10% p=-10%
e=tradovatesim s=znh2 b=short q=10% fp=115.10937
Open a long/short market
e=tradovatesim s=znh2 b=long q=1 t=market
e=tradovatesim s=znh2 b=short q=1 t=market
Open a long with a stop-limit/market
e=tradovatesim s=znh2 b=long q=10% px=10% p=20%
e=tradovatesim s=znh2 b=long q=10% px=10% t=market
e=tradovatesim s=znh2 b=long q=10% fpx=140.671878 fp=153.46875
e=tradovatesim s=znh2 b=long q=10% fpx=140.6878 t=market
Open a short with a stop-limit/market
e=tradovatesim s=znh2 b=short q=10% px=-10% p=-20%
e=tradovatesim s=znh2 b=short q=10% px=-10% t=market
e=tradovatesim s=znh2 b=short q=10% fpx=115.109375 fp=102.3125
e=tradovatesim s=znh2 b=short q=10% fpx=115.109375 t=market
Close position with a stop-loss
e=tradovatesim s=znh2 b=long c=position px=-10% p=-20%
e=tradovatesim s=znh2 b=long c=position px=-10% t=market
e=tradovatesim s=znh2 b=short c=position px=10% sl=20%
e=tradovatesim s=znh2 b=short c=position px=10% t=market
Close position with take profit
e=tradovatesim s=znh2 b=long c=position p=4%
e=tradovatesim s=znh2 b=short c=position p=-4%
Open a new order with OCO
e=tradovatesim s=znh2 b=long q=1 oco=1 sl=-2% p=2%
e=tradovatesim s=znh2 b=short q=1 oco=1 sl=2% p=-2%
e=tradovatesim s=znh2 b=long q=1 oco=1 fsl=125.390625 fp=130.5
e=tradovatesim s=znh2 b=short q=1 oco=1 fsl=130.5 fp=125.39
Close Position with OCO
e=tradovatesim s=znh2 b=long c=position oco=1 sl=-2% tp=3%
e=tradovatesim s=znh2 b=short c=position oco=1 sl=10% tp=-10%
e=tradovatesim s=znh2 b=long c=position oco=1 fsl=125.3 ftp=131.765625
Open a new order with OSO
b=long oso=1 p=-1% px=-2% sl=-2% tp=3%
p= sets the entry price
px= sets stop loss trigger
sl= sets stop loss price
tp= sets take profit price
You can also use it with just tp or just sl.
b=long oso=1 p=-1% px=-2% sl=-2%
b=long oso=1 p=-1% tp=3%
e=tradovatesim s=znh2 b=long oso=1 p=-1% px=-2% t=market
Close Position and reverse your order
This example below shows us how to tell tell Autoview to close the previous position before opening the opposite (reversed)
e=tradovate s=ReplaceWithProperSymbol b=short c=position t=market
e=tradovate s=ReplaceWithProperSymbol b=long q=1 t=market
Reversed Short Position
e=tradovate s=ReplaceWithProperSymbol b=long c=position t=market
e=tradovate s=ReplaceWithProperSymbol b=short q=1 t=market
Very helpful. It would be great to show a step by step example on how to use built-in tradingview strategy to create automated trading on Tradovate.
hi i want to open position with tp and sl in one alarm i try every command(oco and ...) it can not be
i can make position with alarm but i can not set tp and sl in one alarm
when i use oco in alarm it just send order with tp and sl but not open a postion
when is dont use it it just open position with no tp and sl order
can i set tp sl order and open market position in one alarm?
or i shoud have one alarm for open market position
and another alarm for send tp sl order ?
please help me iam trying for weeks
my exchange :okx
Please sign in to leave a comment.