Merge pull request #257 from djbadders/develop

Fixed TradingView chart flashing in the bag details pop-up
This commit is contained in:
Dave Baddeley 2021-02-11 16:07:32 +00:00 committed by GitHub
commit ca643c2815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions

View File

@ -536,16 +536,7 @@ namespace Core.Helper
string result = "#"; string result = "#";
if (platform.Equals("TradingView")) if (platform.Equals("TradingView"))
{ {
result = "https://www.tradingview.com/chart/?symbol=" + exchange.ToUpper() + ":"; result = "https://www.tradingview.com/symbols/" + market.ToUpper() + "/?exchange=" + exchange.ToUpper();
string pairName = SystemHelper.StripBadCode(market, Constants.WhiteListMinimal);
if (pairName.StartsWith(mainMarket))
{
pairName = pairName.Replace(mainMarket, "") + mainMarket;
}
result += pairName;
} }
else if (platform.Equals("TradingViewFutures")) else if (platform.Equals("TradingViewFutures"))
{ {

View File

@ -102,7 +102,10 @@
<!-- TradingView Widget BEGIN --> <!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container"> <div class="tradingview-widget-container">
<div id="tradingview_6aa22" style="height:600px;"></div> <div id="tradingview_6aa22" style="height:600px;"></div>
<div class="tradingview-widget-copyright"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, Model.DCAMarket, Model.Summary.MainMarket)" rel="noopener" target="_blank"><span class="blue-text">@Model.DCAMarket</span> <span class="blue-text">chart</span> by TradingView</a></div> <div class="tradingview-widget-copyright">
<a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, Model.DCAMarket, Model.Summary.MainMarket)" rel="noopener" target="_blank">
<span class="blue-text">@Model.DCAMarket</span> <span class="blue-text">chart</span> by TradingView</a>
</div>
</div> </div>
<!-- TradingView Widget END --> <!-- TradingView Widget END -->
</div> </div>