OPEN-SOURCE SCRIPT
Telah dikemas kini

XT Basic MA Crossover

272
The XT Basic MA Crossover is designed to introduce the use of dynamic variables to your alert messages. Unlike the XT Up/Down Bar Indicator, which preloads the payload into the TradingView alert Message field, strategies do not support this functionality.

You will need to copy and paste into the message window for the alert to work using the strategy actions.

Example Alert Message:
```
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;
```
You'll need to add your secret key to the message between = and ;

Correct: key=123456789123456789;
Incorrect: key=Your CrossTrade Secret Key123456789123456789;

You'll also need to add your webhook URL to the Notifications tab on the alert.

Visual Signals: The strategy is a simple moving average crossover using a 2 period MA to simulate a lot of frequent trades.

You can also add stops and targets to your strategy alerts by adding "take_profit" and "stop_loss" values to the message. This can be supplied as numerical values, percentages, or tick based values. Learn More.

If you need help: Here is a LINK to our TradingView alerts Help Doc.

Disclaimer: This indicator is designed and offered purely as an educational resource to showcase how to structure your alert messages. We do not suggest, advise, or recommend using this indicator in production with live capital.
Nota Keluaran
Removed the QTY input to simplify the script
Nota Keluaran
Updated to Pine Script V6
Nota Keluaran
Updated to provide inputs for the MA length and plotting on the chart
Nota Keluaran
Swapped the NT8 instrument format for the Pine Script {{ticker}} variable now that CrossTrade supports continuous contracts and will automatically convert the ticker into NT8s format.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.