function LoadCharts() {
let symbol = document.getElementById('pairs').value;
// List of symbols for each chart
const symbols = ['BTCUSDT.P', 'ETHUSDT.P', 'BCHUSDT.P', 'XRPUSDT.P', 'LTCUSDT.P', 'TRXUSDT.P', 'ETCUSDT.P', 'LINKUSDT.P', 'XLMUSDT.P',
'ADAUSDT.P', 'XMRUSDT.P', 'DASHUSDT.P', 'ZECUSDT.P', 'BNBUSDT.P', 'ATOMUSDT.P', 'VETUSDT.P', 'NEOUSDT.P', 'QTUMUSDT.P',
'IOSTUSDT.P', 'THETAUSDT.P', 'KNCUSDT.P', 'ZRXUSDT.P', 'COMPUSDT.P', 'OMGUSDT.P', 'DOGEUSDT.P', 'SXPUSDT.P', 'KAVAUSDT.P',
'BANDUSDT.P', 'RLCUSDT.P', 'MKRUSDT.P', 'DOTUSDT.P', 'DEFIUSDT.P', 'YFIUSDT.P', 'BALUSDT.P', 'TRBUSDT.P',
'RUNEUSDT.P', 'SUSHIUSDT.P', 'EGLDUSDT.P', 'SOLUSDT.P', 'STORJUSDT.P', 'BLZUSDT.P', 'UNIUSDT.P', 'AVAXUSDT.P', 'FTMUSDT.P',
'ENJUSDT.P', 'KSMUSDT.P', 'NEARUSDT.P', 'AAVEUSDT.P', 'FILUSDT.P', 'RSRUSDT.P'];
// Add delay between each chart load with a different symbol
for (let i = 0; i < 1; i++) {
setTimeout(function() {
var widget = window.tvWidget = new TradingView.widget({
"width": chartWidth, // Chart width
"height": chartHeight, // Chart height
"symbol": "BINANCE:" + symbols[i % symbols.length], // Use a different symbol for each chart
"interval": "5", // You can vary intervals if needed
"timezone": "Asia/Kolkata",
"hide_side_toolbar": false,
"hide_volume": false,
"theme": "Dark",
"style": "1",
"locale": "out",
"toolbar_bg": "#f1f3f6",
"enable_publishing": false,
"allow_symbol_change": true,
"details": true,
"container_id": 'tvchart' + i,
"studies": [
{id: "MAExp@tv-basicstudies",inputs: {length: 7}},
{id: "MAExp@tv-basicstudies",inputs: {length: 25}},
{id: "MAExp@tv-basicstudies",inputs: {length: 99}}],
});
}, i * 2000); // Delay of 2 seconds (2000 milliseconds) between each chart
}
}
This is my code
I tried this….
{id: "MAExp@tv-basicstudies",inputs: {length: 7},style:{color:"#FFFF00"}}
I have searched alot to solve this problem but iam unable to do it.please guid me how to plot multiple emas with different colours