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.
Error: Symbol is inaccessible
Tradovate has restrictions on market pricing data, usually requiring an additional subscription, thus Autoview can have trouble performing calculations.
You can provide the current market price by using the price= parameter. When using TradingView alert messages, price={{close}} can be used.
Using fixed parameters, like fp=,fpx=, fsl=, and ftp=, which use exact prices, avoid needing to fetch the current price.
When closing positions, adding ps=position bases all of the prices off of your position's average, rather than attempting to fetch the current price.
Note: Information about can be found in the article: Tradovate Errors
Parameters
Here we will cover some of the Parameters that we will be using to set up some basic trades for Tradovate using Autoview.
Account Identifier [aid=]
aid= is used to select which sub-account to use internally.
Tradovate runs all accounts under one API key. When using this parameter, be sure to include your sub-account name in the syntax to select it.
aid=subaccount2312
Exchange [e=]
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.
e=tradovate
e=tradovatesim
Symbol [s=]
"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.
s=ZNH2
s=ESH2
s=MSFT
Book [b=]
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]
c=all
Order Price [p=]
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)
Quantity [q=]
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 (p is ignored)
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)
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=10%
px=120
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)
Order Examples
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 Ampersands
e=tradovatesim s=znh2 b=long q=1 p=2% & sl=-2%
e=tradovatesim s=znh2 b=short q=1 p=-2% & sl=2%
e=tradovatesim s=znh2 b=long q=1 fp=130.5 & fsl=125.390625
e=tradovatesim s=znh2 b=short q=1 fp=125.39 & fsl=130.5
Close Position with Ampersands
e=tradovatesim s=znh2 b=long q=10% fp=140.6562
e=tradovatesim s=znh2 b=long c=position & sl=-2% tp=3%
e=tradovatesim s=znh2 b=short c=position & sl=10% tp=-10%
e=tradovatesim s=znh2 b=long c=position & fsl=125.3 ftp=131.765625
Open a new order with Ampersands
b=long p=-2% px=-1% & sl=-3% tp=3%
p= sets the entry price
px= sets order trigger price
sl= sets stop loss price
tp= sets take profit price
You can also use it with just tp or just sl.
b=long p=-2% px=-1% & sl=-3%
or
b=long p=-2% px=-1% & tp=3%
When using market orders, there is no price used:
b=short t=market px=1% & tp=-3%
or
b=short t=market px=1% & tp=3%
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)
Long Position
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
Note: When slow closing affects entries, add a delay between commands: delay=1
Break-Even
ABE is breakeven + this value in price units.
ABEX is the number in price units to trigger.
s=mnqm4 q=1 b=long t=market price=18576.25 & fsl=18558.25 abe=5 abex=15
Auto-Trailing
All values are in points.
ATSL is the amount of points to trail the stop.
ATX is points from entry to activate the trail.
ATF is how often to update the trail (in this case every tick).
s=mnqm4 q=1 b=long t=market price=18576.25 & fsl=18558.25 atsl=4.5 fatx=18 atf=0.25
Comments
0 comments
Article is closed for comments.