From f3fa940fd6b2520dff85e9e1e973cbd25eaec642 Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Mon, 14 Jan 2019 12:21:30 +0900 Subject: [PATCH] add TV indicators --- Core/DataObjects/PTMagicData.cs | 6 +++++- Core/Helper/SystemHelper.cs | 7 +++++++ Monitor/Pages/_get/BagDetails.cshtml | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Core/DataObjects/PTMagicData.cs b/Core/DataObjects/PTMagicData.cs index 98243b6..de9b56f 100644 --- a/Core/DataObjects/PTMagicData.cs +++ b/Core/DataObjects/PTMagicData.cs @@ -71,7 +71,11 @@ namespace Core.Main.DataObjects.PTMagicData public int MaxSettingsLogEntries { get; set; } = 20; public string LinkPlatform { get; set; } = "TradingView"; public string DefaultDCAMode { get; set; } = "Simple"; - + public string TvStudyA { get; set; } = ""; + public string TvStudyB { get; set; } = ""; + public string TvStudyC { get; set; } = ""; + public string TvStudyD { get; set; } = ""; + public string RootUrl { get diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs index 219a414..6592fbf 100644 --- a/Core/Helper/SystemHelper.cs +++ b/Core/Helper/SystemHelper.cs @@ -604,6 +604,13 @@ namespace Core.Helper return result; } + public static string GetTradingViewStudies(string study) + { + string result = study; + + return result; + } + public static string GetCurrencySymbol(string code) { string result = code; diff --git a/Monitor/Pages/_get/BagDetails.cshtml b/Monitor/Pages/_get/BagDetails.cshtml index 1362126..273794f 100644 --- a/Monitor/Pages/_get/BagDetails.cshtml +++ b/Monitor/Pages/_get/BagDetails.cshtml @@ -269,6 +269,8 @@ "allow_symbol_change": false, "hideideas": true, "hide_side_toolbar": false, + "studies": ["@Core.Helper.SystemHelper.GetTradingViewStudies(Model.PTMagicConfiguration.GeneralSettings.Monitor.TvStudyA)", "@Core.Helper.SystemHelper.GetTradingViewStudies(Model.PTMagicConfiguration.GeneralSettings.Monitor.TvStudyB)", "@Core.Helper.SystemHelper.GetTradingViewStudies(Model.PTMagicConfiguration.GeneralSettings.Monitor.TvStudyC)"], + "show_popup_button": true, "container_id": "tradingview_6aa22" } );