commit
3fcbedbfd0
|
@ -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"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,9 +21,16 @@ namespace Core.ProfitTrailer
|
||||||
|
|
||||||
// PT allows for "advanced_stats" to show details of the trailing logic and dynamic formulas.
|
// PT allows for "advanced_stats" to show details of the trailing logic and dynamic formulas.
|
||||||
if (result.Contains("STATS") || result.Contains("DYN"))
|
if (result.Contains("STATS") || result.Contains("DYN"))
|
||||||
|
{
|
||||||
|
if (result.Contains("STATS-TSL") && (!result.Contains("TSL-STRAT")))
|
||||||
|
{
|
||||||
|
result = "TSL";
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
result = "";
|
result = "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// strategy labels with variable values
|
// strategy labels with variable values
|
||||||
if (result.Contains("BUY TIMEOUT AS"))
|
if (result.Contains("BUY TIMEOUT AS"))
|
||||||
{
|
{
|
||||||
|
@ -410,9 +417,16 @@ namespace Core.ProfitTrailer
|
||||||
}
|
}
|
||||||
else if (strategy.Name.Contains("STATS"))
|
else if (strategy.Name.Contains("STATS"))
|
||||||
// Avoid displaying advanced buy stats and completed level formulas
|
// Avoid displaying advanced buy stats and completed level formulas
|
||||||
|
{
|
||||||
|
if (strategy.Name.Contains("STATS-TSL") && (!strategy.Name.Contains("TSL-STRAT")))
|
||||||
|
{
|
||||||
|
strategyText += "<span class=\"label label-warn\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategy.Name + "\" >" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + "<i class=\"fa fa-flag text-success\"></i></span> ";
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
strategy.Name = "";
|
strategy.Name = "";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (strategy.Name.Contains("FORMULA"))
|
else if (strategy.Name.Contains("FORMULA"))
|
||||||
// Avoid displaying formula details
|
// Avoid displaying formula details
|
||||||
{
|
{
|
||||||
|
|
|
@ -155,7 +155,7 @@ else
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
<h4 class="m-t-0 m-b-20 header-title"><b>Market Trends at @Model.PTMagicConfiguration.GeneralSettings.Application.Exchange</b></h4>
|
<h4 class="m-t-0 m-b-20 header-title"><b>Market Trend Averages at @Model.PTMagicConfiguration.GeneralSettings.Application.Exchange</b></h4>
|
||||||
<table class="table table-sm">
|
<table class="table table-sm">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -280,7 +280,7 @@ else
|
||||||
string trendChangeOutput = mps.MarketTrendChanges[marketTrend.Name].ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
string trendChangeOutput = mps.MarketTrendChanges[marketTrend.Name].ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
||||||
if ((mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) || (mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) )
|
if ((mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) || (mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) )
|
||||||
{
|
{
|
||||||
<td class="text-right text-autocolor-saw"><i class="fa fa-ban text-muted" data-toggle="tooltip" data-placement="top" title="This coin has been excluded from the average market trend on this timeframe due to your Threshold setting."></i> @trendChangeOutput%</td>
|
<td class="text-right text-autocolor-saw"><i class="fa fa-ban text-muted" data-toggle="tooltip" data-placement="top" title="This coin has been excluded from the Market Trend Averages for this timeframe due to your Threshold setting."></i> @trendChangeOutput%</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,7 +161,7 @@ namespace Monitor.Pages
|
||||||
double AvailableBalance = PTData.GetCurrentBalance();
|
double AvailableBalance = PTData.GetCurrentBalance();
|
||||||
foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog)
|
foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog)
|
||||||
{
|
{
|
||||||
totalCurrentValue = totalCurrentValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
totalCurrentValue = totalCurrentValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
totalCurrentValue = totalCurrentValue + AvailableBalance;
|
totalCurrentValue = totalCurrentValue + AvailableBalance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -196,15 +196,15 @@ namespace Monitor.Pages
|
||||||
{
|
{
|
||||||
if (sellStrategyText.Contains("PENDING"))
|
if (sellStrategyText.Contains("PENDING"))
|
||||||
{
|
{
|
||||||
PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
else if (dcaLogEntry.BuyStrategies.Count > 0)
|
else if (dcaLogEntry.BuyStrategies.Count > 0)
|
||||||
{
|
{
|
||||||
DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
@page
|
|
||||||
@model DownloadFileModel
|
|
||||||
@{
|
|
||||||
Layout = null;
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Core.Main;
|
|
||||||
using Core.Helper;
|
|
||||||
using Core.Main.DataObjects.PTMagicData;
|
|
||||||
using Core.MarketAnalyzer;
|
|
||||||
|
|
||||||
namespace Monitor.Pages {
|
|
||||||
public class DownloadFileModel : _Internal.BasePageModelSecure {
|
|
||||||
|
|
||||||
public void OnGet() {
|
|
||||||
// Initialize Config
|
|
||||||
base.Init();
|
|
||||||
|
|
||||||
InitializeDownload();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void InitializeDownload() {
|
|
||||||
string fileName = GetStringParameter("f", "");
|
|
||||||
if (System.IO.File.Exists(PTMagicBasePath + fileName)) {
|
|
||||||
if (!System.IO.Directory.Exists(PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar)) {
|
|
||||||
System.IO.Directory.CreateDirectory(PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar);
|
|
||||||
}
|
|
||||||
|
|
||||||
string sourcefilePath = PTMagicBasePath + fileName;
|
|
||||||
string destinationFilePath = PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar + fileName + ".zip";
|
|
||||||
|
|
||||||
ZIPHelper.CreateZipFile(new ArrayList() { sourcefilePath }, destinationFilePath);
|
|
||||||
|
|
||||||
Response.Redirect(PTMagicConfiguration.GeneralSettings.Monitor.RootUrl + "assets/tmp/" + fileName + ".zip");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -132,13 +132,13 @@ a:active {
|
||||||
.table {
|
.table {
|
||||||
color : white;
|
color : white;
|
||||||
font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
font-size : 12px;
|
font-size : 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the screen size is 400px wide or less, set the font-size of <div> to 30px */
|
/* If the screen size is 400px wide or less, set the font-size of <div> to 30px */
|
||||||
@media screen and (max-width: 400px) {
|
@media screen and (max-width: 400px) {
|
||||||
.table {
|
.table {
|
||||||
font-size: 10px;
|
font-size: 9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Core.Helper;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.5.3")]
|
[assembly: AssemblyVersion("2.5.4")]
|
||||||
[assembly: AssemblyProduct("PT Magic")]
|
[assembly: AssemblyProduct("PT Magic")]
|
||||||
|
|
||||||
namespace PTMagic
|
namespace PTMagic
|
||||||
|
|
|
@ -15,6 +15,7 @@ DEL /F /S /Q *
|
||||||
REM Copy release files
|
REM Copy release files
|
||||||
MD PTMagic
|
MD PTMagic
|
||||||
XCOPY /Y /S ..\..\PTMagic\_defaults\* .\
|
XCOPY /Y /S ..\..\PTMagic\_defaults\* .\
|
||||||
|
XCOPY /Y /S ..\..\PTMagic\_auto_updater\* .\PTMagic
|
||||||
XCOPY /Y /S ..\..\PTMagic\bin\Release\PublishOutput .\PTMagic
|
XCOPY /Y /S ..\..\PTMagic\bin\Release\PublishOutput .\PTMagic
|
||||||
CD .\PTMagic
|
CD .\PTMagic
|
||||||
DEL /F /S /Q _presets
|
DEL /F /S /Q _presets
|
||||||
|
|
Loading…
Reference in New Issue