Example Strategies & Indicators
Examples using TradingView Indicators and Strategies
Last updated
Examples using TradingView Indicators and Strategies
Last updated
This is the fastest and easiest way to get an alert sent to CrossTrade. The indicator will fire a Buy alert when the bar closes up and a Sell alert when the bar closes down which means you don't have to wait long for a signal to come through.
Step 1 - ⭐ Add to Favorites Step 2 - Load a Superchart and apply the XT Example Indicator
Step 3 - Create an alert and click on the Condition dropdown to select XT Example Indy Step 4 - Copy and paste your secret key into the Message window.
Remember, the key goes between = and ; Example: key=1234567891011121314151617181920;
Final Step: copy and paste your webhook URL into the Notifications tab here:
Strategies can not be programmed to automatically supply a payload into the message field, so you will need to manually copy and paste. Strategies offer the use of dynamic variables to tell crosstrade certain information about the command. We can use the strategy order action and quantity in place of BUY or SELL in the action field, and supplying a numerical value for the quantity.
key=Your CrossTrade Secret Key; command=PLACE; account=sim101; instrument=ES 12-24; action={{strategy.order.action}}; qty={{strategy.order.quantity}}; order_type=MARKET; tif=DAY; flatten_first=true; Additionally, you can provide take_profit and stop_loss levels with your strategy alert. They can be supplied as either numerical values, tick, or percentage based. Examples:
We are including flatten_first to close any existing position before opening a new one.
Building off of the previous two examples, this strategy includes the entire message payload inside the Pine Script which allows you the ability to provide the stop and target levels dynamically. Additionally, because the message payload is inside of the strategy, all that is required inside of the TradingView Alert Message is the dynamic variable for {{strategy.order.alert_message}}
Don't forget to add your secret key inside the strategy code