Merge pull request #299 from HojouFotytu/develop

Settings GUI
This commit is contained in:
HojouFotytu 2021-04-21 17:10:52 +09:00 committed by GitHub
commit 802142c67b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 60 additions and 376 deletions

View File

@ -701,13 +701,13 @@ namespace Core.Main
// Check if the program is enabled // Check if the program is enabled
if (this.PTMagicConfiguration.GeneralSettings.Application.IsEnabled) if (this.PTMagicConfiguration.GeneralSettings.Application.IsEnabled)
{ {
result = RunProfitTrailerSettingsAPIChecks();
try try
{ {
if (this.PTMagicConfiguration.GeneralSettings.Application.TestMode) if (this.PTMagicConfiguration.GeneralSettings.Application.TestMode)
{ {
this.Log.DoLogInfo("TESTMODE ENABLED - No files will be changed!"); this.Log.DoLogWarn("TESTMODE ENABLED - No PT settings will be changed!");
} }
result = RunProfitTrailerSettingsAPIChecks();
// Check for CoinMarketCap API Key // Check for CoinMarketCap API Key
if (!String.IsNullOrEmpty(this.PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey)) if (!String.IsNullOrEmpty(this.PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey))
@ -731,7 +731,7 @@ namespace Core.Main
} }
catch (System.NullReferenceException) catch (System.NullReferenceException)
{ {
this.Log.DoLogError("PTM failed to read the Config File. That means something in the File is either missing or incorrect. If this happend after an update please take a look at the release notes at: https://github.com/PTMagicians/PTMagic/releases"); this.Log.DoLogError("PTM failed to read the General Settings file. That means something in the file is either missing or incorrect. If this happend after an update please take a look at the release notes at: https://github.com/PTMagicians/PTMagic/releases");
Console.WriteLine("Press enter to close the Application..."); Console.WriteLine("Press enter to close the Application...");
Console.ReadLine(); Console.ReadLine();
Environment.Exit(0); Environment.Exit(0);
@ -739,7 +739,7 @@ namespace Core.Main
} }
else else
{ {
this.Log.DoLogWarn("PTMagic disabled, shutting down..."); this.Log.DoLogWarn("PTMagic is disabled. The scheduled raid was skipped.");
result = false; result = false;
} }
@ -952,7 +952,7 @@ namespace Core.Main
this.Log.DoLogInfo("+ Active setting: " + this.LastRuntimeSummary.CurrentGlobalSetting.SettingName); this.Log.DoLogInfo("+ Active setting: " + this.LastRuntimeSummary.CurrentGlobalSetting.SettingName);
this.Log.DoLogInfo("+ Global setting changed: " + ((this.LastRuntimeSummary.LastGlobalSettingSwitch == this.LastRuntimeSummary.LastRuntime) ? "Yes" : "No") + " " + ((this.LastRuntimeSummary.FloodProtectedSetting != null) ? "(Flood protection!)" : "")); this.Log.DoLogInfo("+ Global setting changed: " + ((this.LastRuntimeSummary.LastGlobalSettingSwitch == this.LastRuntimeSummary.LastRuntime) ? "Yes" : "No") + " " + ((this.LastRuntimeSummary.FloodProtectedSetting != null) ? "(Flood protection!)" : ""));
this.Log.DoLogInfo("+ Single Market Settings changed: " + (this.SingleMarketSettingChanged ? "Yes" : "No")); this.Log.DoLogInfo("+ Single Market Settings changed: " + (this.SingleMarketSettingChanged ? "Yes" : "No"));
this.Log.DoLogInfo("+ PT Config updated: " + (((this.GlobalSettingWritten || this.SingleMarketSettingChanged) && !this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? "Yes" : "No")); this.Log.DoLogInfo("+ PT Config updated: " + (((this.GlobalSettingWritten || this.SingleMarketSettingChanged) && !this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? "Yes" : "No") + ((this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? " - TESTMODE active" : ""));
this.Log.DoLogInfo("+ Markets with active single market settings: " + this.TriggeredSingleMarketSettings.Count.ToString()); this.Log.DoLogInfo("+ Markets with active single market settings: " + this.TriggeredSingleMarketSettings.Count.ToString());
foreach (string activeSMS in this.SingleMarketSettingsCount.Keys) foreach (string activeSMS in this.SingleMarketSettingsCount.Keys)
{ {
@ -969,7 +969,7 @@ namespace Core.Main
else else
{ {
this.State = Constants.PTMagicBotState_Idle; this.State = Constants.PTMagicBotState_Idle;
Log.DoLogWarn("PTMagic disabled, shutting down until next raid..."); Log.DoLogWarn("PTMagic is disabled. The scheduled raid was skipped.");
} }
} }
catch (Exception ex) catch (Exception ex)
@ -2194,9 +2194,12 @@ namespace Core.Main
if (!this.PTMagicConfiguration.GeneralSettings.Application.TestMode) if (!this.PTMagicConfiguration.GeneralSettings.Application.TestMode)
{ {
SettingsAPI.SendPropertyLinesToAPI(this.PairsLines, this.DCALines, this.IndicatorsLines, this.PTMagicConfiguration, this.Log); SettingsAPI.SendPropertyLinesToAPI(this.PairsLines, this.DCALines, this.IndicatorsLines, this.PTMagicConfiguration, this.Log);
this.Log.DoLogInfo("Settings updates sent to PT!");
}
else
{
this.Log.DoLogWarn("TESTMODE enabled -- no updates sent to PT!");
} }
this.Log.DoLogInfo("Properties saved!");
} }
else else
{ {

View File

@ -48,24 +48,30 @@
</div> </div>
<div id="collapse1" class="panel-collapse collapse"> <div id="collapse1" class="panel-collapse collapse">
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Is Enabled <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="Enables the PTMagic bot."></i></label> <label class="col-md-4 col-form-label">Is Enabled <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If disabled PTM and the PTM monitor will continue to run, however all market analysis and PT settings changes are stopped."></i></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="checkbox" name="Application_IsEnabled" checked="@(Model.PTMagicConfiguration.GeneralSettings.Application.IsEnabled)" data-plugin="switchery" data-color="#81c868" data-size="small" /> <input type="checkbox" name="Application_IsEnabled" checked="@(Model.PTMagicConfiguration.GeneralSettings.Application.IsEnabled)" data-plugin="switchery" data-color="#81c868" data-size="small" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Test Mode <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If TestMode is active, no properties files will be changed"></i></label> <label class="col-md-4 col-form-label">Test Mode <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If TestMode is active market analysis will continue, however PT settings will not be updated."></i></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="checkbox" name="Application_TestMode" checked="@(Model.PTMagicConfiguration.GeneralSettings.Application.TestMode)" data-plugin="switchery" data-color="#81c868" data-size="small" /> <input type="checkbox" name="Application_TestMode" checked="@(Model.PTMagicConfiguration.GeneralSettings.Application.TestMode)" data-plugin="switchery" data-color="#81c868" data-size="small" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Exchange <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The exchange PT Magic is using to get market data."></i></label> <label class="col-md-4 col-form-label">Exchange <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The exchange your PT bot is running on."></i></label>
<div class="col-md-8"> <div class="col-md-8">
@Model.PTMagicConfiguration.GeneralSettings.Application.Exchange <select name="Application_Exchange" class="form-control">
</div> <option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Bittrex", StringComparison.InvariantCultureIgnoreCase))">Bittrex</option>
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Binance", StringComparison.InvariantCultureIgnoreCase))">Binance</option>
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("BinanceUS", StringComparison.InvariantCultureIgnoreCase))">BinanceUS</option>
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("BinanceFutures", StringComparison.InvariantCultureIgnoreCase))">BinanceFutures</option>
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Poloniex", StringComparison.InvariantCultureIgnoreCase))">Poloniex</option>
</select>
</div>
</div> </div>
@ -77,16 +83,16 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Profit Trailer Monitor URL <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The URL to your profit trailer monitor (needed to change your settings for PT 2.0 and above)"></i></label> <label class="col-md-4 col-form-label">Profit Trailer Monitor URL <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The URL to your profit trailer monitor (if PT and PTM are running on the same machine, 'http://localhost:xxxx' should be used.)"></i></label>
<div class="col-md-8"> <div class="col-md-8">
<a href="@Model.PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL" target="_blank">@Model.PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL</a> <input type="text" class="form-control" name="Application_ProfitTrailerMonitorURL" value="@Model.PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL">
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Profit Trailer Server API Token <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The API token needed to communicate with Profit Trailer - set in Profit Trailer Server Settings"></i></label> <label class="col-md-4 col-form-label">Profit Trailer Server API Token <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The API token needed to communicate with Profit Trailer - set in Profit Trailer Server Settings"></i></label>
<div class="col-md-8"> <div class="col-md-8">
@Model.PTMagicConfiguration.GetProfitTrailerServerAPITokenMasked() <input type="text" class="form-control" name="Application_ProfitTrailerServerAPIToken" value="@Model.PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerServerAPIToken">
</div> </div>
</div> </div>
@ -170,23 +176,16 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Open Browser On Start <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If active, a browser window will open as soon as you start the monitor."></i></label> <label class="col-md-4 col-form-label">Open Browser On Start <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If active, a browser window will open as soon as you start the PTM monitor."></i></label>
<div class="col-md-8"> <div class="col-md-8">
<input type="checkbox" name="Monitor_OpenBrowserOnStart" checked="@(Model.PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart)" data-plugin="switchery" data-color="#81c868" data-size="small" /> <input type="checkbox" name="Monitor_OpenBrowserOnStart" checked="@(Model.PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart)" data-plugin="switchery" data-color="#81c868" data-size="small" />
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-md-4 col-form-label">Port <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The port you want to run your monitor on"></i></label> <label class="col-md-4 col-form-label">Port <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The port you want to run your PTM monitor on"></i></label>
<div class="col-md-8"> <div class="col-md-8">
@Model.PTMagicConfiguration.GeneralSettings.Monitor.Port <input type="text" class="form-control" name="Monitor_Port" value="@Model.PTMagicConfiguration.GeneralSettings.Monitor.Port.ToString(new System.Globalization.CultureInfo("en-US"))">
</div>
</div>
<div class="form-group row">
<label class="col-md-4 col-form-label">RootUrl <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The root URL of your monitor website"></i></label>
<div class="col-md-8">
@Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl
</div> </div>
</div> </div>

View File

@ -70,19 +70,19 @@ namespace Monitor.Pages
PTMagicConfiguration.GeneralSettings.Application.TestMode = HttpContext.Request.Form["Application_TestMode"].Equals("on"); PTMagicConfiguration.GeneralSettings.Application.TestMode = HttpContext.Request.Form["Application_TestMode"].Equals("on");
PTMagicConfiguration.GeneralSettings.Application.StartBalance = SystemHelper.TextToDouble(HttpContext.Request.Form["Application_StartBalance"], PTMagicConfiguration.GeneralSettings.Application.StartBalance, "en-US"); PTMagicConfiguration.GeneralSettings.Application.StartBalance = SystemHelper.TextToDouble(HttpContext.Request.Form["Application_StartBalance"], PTMagicConfiguration.GeneralSettings.Application.StartBalance, "en-US");
PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerDefaultSettingName = HttpContext.Request.Form["Application_ProfitTrailerDefaultSettingName"]; PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerDefaultSettingName = HttpContext.Request.Form["Application_ProfitTrailerDefaultSettingName"];
PTMagicConfiguration.GeneralSettings.Application.Exchange = HttpContext.Request.Form["Application_Exchange"];
PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL = HttpContext.Request.Form["Application_ProfitTrailerMonitorURL"];
PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerServerAPIToken = HttpContext.Request.Form["Application_ProfitTrailerServerAPIToken"];
PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset = HttpContext.Request.Form["Application_TimezoneOffset"]; PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset = HttpContext.Request.Form["Application_TimezoneOffset"];
PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency = HttpContext.Request.Form["Application_MainFiatCurrency"]; PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency = HttpContext.Request.Form["Application_MainFiatCurrency"];
PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Application_FloodProtectionMinutes"], PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes); PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Application_FloodProtectionMinutes"], PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes);
PTMagicConfiguration.GeneralSettings.Application.InstanceName = HttpContext.Request.Form["Application_InstanceName"]; PTMagicConfiguration.GeneralSettings.Application.InstanceName = HttpContext.Request.Form["Application_InstanceName"];
PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey = HttpContext.Request.Form["Application_CoinMarketCapAPIKey"]; PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey = HttpContext.Request.Form["Application_CoinMarketCapAPIKey"];
PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey = HttpContext.Request.Form["Application_FreeCurrencyConverterAPIKey"]; PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey = HttpContext.Request.Form["Application_FreeCurrencyConverterAPIKey"];
PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected = HttpContext.Request.Form["Monitor_IsPasswordProtected"].Equals("on"); PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected = HttpContext.Request.Form["Monitor_IsPasswordProtected"].Equals("on");
PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart = HttpContext.Request.Form["Monitor_OpenBrowserOnStart"].Equals("on"); PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart = HttpContext.Request.Form["Monitor_OpenBrowserOnStart"].Equals("on");
PTMagicConfiguration.GeneralSettings.Monitor.DefaultDCAMode = HttpContext.Request.Form["Monitor_AnalyzerChart"]; PTMagicConfiguration.GeneralSettings.Monitor.AnalyzerChart = HttpContext.Request.Form["Monitor_AnalyzerChart"];
PTMagicConfiguration.GeneralSettings.Monitor.Port = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_Port"], PTMagicConfiguration.GeneralSettings.Monitor.Port);
PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphIntervalMinutes"], PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes); PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphIntervalMinutes"], PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes);
PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphMaxTimeframeHours"], PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours); PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphMaxTimeframeHours"], PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours);
PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_RefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds); PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_RefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds);

View File

@ -6,7 +6,7 @@ using Core.Helper;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
[assembly: AssemblyVersion("2.5.10")] [assembly: AssemblyVersion("2.5.11")]
[assembly: AssemblyProduct("PT Magic")] [assembly: AssemblyProduct("PT Magic")]
namespace PTMagic namespace PTMagic

View File

@ -1,318 +0,0 @@
//
// The settings below offer a basic example of some of the options available when using PTMagic.
// You should take your time and adjust these settings according to your own personal preferences.
// Always test your PTMagic settings by running a Profit Trailer bot in TESTMODE, to make sure
// it is performing as you expect.
//
// For more information on these settings, see the wiki at: https://github.com/PTMagicians/PTMagic/wiki/settings.analyzer
{
"AnalyzerSettings": {
"MarketAnalyzer": {
"StoreDataMaxHours": 48, // Number of hours to store market data
"IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers
"ExcludeMainCurrency": true, // Excludes the main currency (for example BTC) from market trend analysis
"MarketTrends": [
{
"Name": "1h", // UNIQUE market trend name (to be referenced by your triggers below)
"Platform": "Exchange", // Platform to grab prices from (Allowed values are: CoinMarketCap, Exchange)
"MaxMarkets": 50, // Number of markets/pairs to analyze sorted by 24h volume
"TrendMinutes": 60, // Number of minutes to build a trend (1440 = 24h, 720 = 12h, 60 = 1h)
"TrendCurrency": "Market", // Trend Currency to build the trend against. If set to "Fiat", the trend will
// take the USD value of your main currency into account to build the trend.
// "Market" will build a trend against your base currency, such as BTC or USDT.
"TrendThreshold": 15, // Any coin that is above 15% or below -15% for this timeframe will not be used when calculating the market average.
"DisplayGraph": false, // Use this trend in the graph on the PTM Monitor dashboard and market analyzer
"DisplayOnMarketAnalyzerList": false // Disply this trend for all coins on the PTM Monitor market analyzer
},
{
"Name": "6h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 360,
"TrendCurrency": "Market",
"TrendThreshold": 30,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
},
{
"Name": "12h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 720,
"TrendCurrency": "Market",
"TrendThreshold": 50,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
},
{
"Name": "24h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 1440,
"TrendCurrency": "Market",
"TrendThreshold": 75,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
}
]
},
// ================================ GLOBAL SETTINGS ================================
//
"GlobalSettings": [ // Global settings for Profit Trailer properties
//
// ===================================================================================
// -----------------------------
{
"SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting
"TriggerConnection": "AND", // Define if triggers will be connected by AND or OR
"Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above
{
"MarketTrendName": "1h", // Reference to the market trend specified above
"MaxChange": 0 // The maximum value for this trigger to be true. (Any value below "0" will trigger this)
},
{
"MarketTrendName": "12h",
"MaxChange": -2
},
{
"MarketTrendName": "24h",
"MaxChange": -5
}
],
"PairsProperties": { // Properties for PAIRS.PROPERTIES
// Any valid setting from https://wiki.profittrailer.com/en/config can be used here.
// You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting.
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_trailing_profit_OFFSETPERCENT": -50
},
"DCAProperties": { // Properties for DCA.PROPERTIES
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -75
}
},
// -----------------------------
{
"SettingName": "TankingDown",
"TriggerConnection": "AND",
"Triggers": [
{
"MarketTrendName": "1h",
"MaxChange": 0
},
{
"MarketTrendName": "12h",
"MaxChange": 0
},
{
"MarketTrendName": "24h", // Any value between -5 and -3 will make this trigger true.
"MaxChange": -3,
"MinChange": -5 // The minimum value for this trigger to be true. (Any value above "-5" will trigger this)
}
],
"PairsProperties": {
"max_trading_pairs_OFFSET": -2,
"DEFAULT_min_buy_volume_OFFSETPERCENT": 100,
//"DEFAULT_initial_cost_OFFSETPERCENT": -50,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50,
"DEFAULT_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_trailing_profit_OFFSETPERCENT": -25
},
"DCAProperties": {
//"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100,
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50
},
"IndicatorsProperties": {
}
},
// -----------------------------
{
"SettingName": "BearSighted",
"TriggerConnection": "AND",
"Triggers": [
{
"MarketTrendName": "1h",
"MaxChange": 1
},
{
"MarketTrendName": "12h",
"MaxChange": 0
},
{
"MarketTrendName": "24h",
"MaxChange": -1,
"MinChange": -3
}
],
"PairsProperties": {
"max_trading_pairs_OFFSET": -1,
//"DEFAULT_initial_cost_OFFSETPERCENT": -25,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25,
"DEFAULT_trailing_buy_OFFSETPERCENT": 10,
"DEFAULT_trailing_profit_OFFSETPERCENT": -10
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10,
},
"IndicatorsProperties": {
}
},
// -----------------------------
{
"SettingName": "ReadyForLiftOff",
"TriggerConnection": "AND",
"Triggers": [
{
"MarketTrendName": "1h",
"MinChange": 0
},
{
"MarketTrendName": "12h",
"MinChange": 0
},
{
"MarketTrendName": "24h",
"MinChange": 1,
"MaxChange": 3
}
],
"PairsProperties": {
"max_trading_pairs_OFFSET": 1,
//"DEFAULT_initial_cost_OFFSETPERCENT": 10,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10,
"DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 10
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10,
},
"IndicatorsProperties": {
}
},
// -----------------------------
{
"SettingName": "ToTheMoon",
"TriggerConnection": "AND",
"Triggers": [
{
"MarketTrendName": "1h",
"MinChange": 1
},
{
"MarketTrendName": "12h",
"MinChange": 1
},
{
"MarketTrendName": "24h",
"MinChange": 3
}
],
"PairsProperties": {
"max_trading_pairs_OFFSET": 2,
//"DEFAULT_initial_cost_OFFSETPERCENT": 20,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
"DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 20
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
},
"IndicatorsProperties": {
}
},
// -----------------------------
{
"SettingName": "Default",
"PairsProperties": {
"File": "PAIRS.properties"
},
"DCAProperties": {
"File": "DCA.properties"
},
"IndicatorsProperties": {
"File": "INDICATORS.properties"
}
}
],
// ================================ COIN-SPECIFIC SETTINGS ================================
//
"SingleMarketSettings": [ // Single market/pair settings for Profit Trailer properties
// Any setting from https://wiki.profittrailer.com/doku.php?id=pairs.properties
// marked as CS (coin-specific) can be used here.
// Only coins that meet the triggered conditions will have the settings applied.
{
"SettingName": "BlacklistCoins",
"StopProcessWhenTriggered": true,
"Triggers": [
{
"AgeDaysLowerThan": 21
}
],
"PairsProperties": {
"DEFAULT_trading_enabled": false,
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_DCA_enabled": false
}
},
// -----------------------------
{
"SettingName": "PumpNDumpProtection",
"TriggerConnection": "OR",
"Triggers": [
{
"MarketTrendName": "1h",
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = Single market
// trend compared relative to the market trend
// Absolute = Single market trend viewed on its own
"MinChange": 8
},
{
"MarketTrendName": "12h",
"MarketTrendRelation": "Relative",
"MinChange": 10
},
{
"MarketTrendName": "24h",
"MarketTrendRelation": "Relative",
"MinChange": 12
}
],
"OffTriggers": [
{
"HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting
// for 3 hours, since the last time it triggered.
}
],
"PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_DCA_enabled": false
}
},
// -----------------------------
{
"SettingName": "FreefallBlock",
"TriggerConnection": "OR",
"Triggers": [
{
"MarketTrendName": "1h",
"MarketTrendRelation": "Absolute",
"MaxChange": -5
}
],
"OffTriggers": [
{
"HoursSinceTriggered": 1
}
],
"PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_DCA_enabled": false
}
}
]
}
}

View File

@ -84,7 +84,7 @@
"PairsProperties": { // Properties for PAIRS.PROPERTIES "PairsProperties": { // Properties for PAIRS.PROPERTIES
// Any valid setting from https://wiki.profittrailer.com/en/config can be used here. // Any valid setting from https://wiki.profittrailer.com/en/config can be used here.
// You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting. // You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting.
"DEFAULT_sell_only_mode_enabled": true, "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_trailing_profit_OFFSETPERCENT": -50 "DEFAULT_trailing_profit_OFFSETPERCENT": -50
}, },
"DCAProperties": { // Properties for DCA.PROPERTIES "DCAProperties": { // Properties for DCA.PROPERTIES
@ -112,16 +112,16 @@
], ],
"PairsProperties": { "PairsProperties": {
"max_trading_pairs_OFFSET": -2, "max_trading_pairs_OFFSET": -2,
"DEFAULT_min_buy_volume_OFFSETPERCENT": 100, "DEFAULT_min_buy_volume_OFFSETPERCENT": 100,
//"DEFAULT_initial_cost_OFFSETPERCENT": -50, //"DEFAULT_initial_cost_OFFSETPERCENT": -50,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50, //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50,
"DEFAULT_trailing_buy_OFFSETPERCENT": 25, "DEFAULT_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_trailing_profit_OFFSETPERCENT": -25 "DEFAULT_trailing_profit_OFFSETPERCENT": -25
}, },
"DCAProperties": { "DCAProperties": {
//"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100, //"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100,
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25, "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50 "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50
}, },
"IndicatorsProperties": { "IndicatorsProperties": {
} }
@ -147,14 +147,14 @@
], ],
"PairsProperties": { "PairsProperties": {
"max_trading_pairs_OFFSET": -1, "max_trading_pairs_OFFSET": -1,
//"DEFAULT_initial_cost_OFFSETPERCENT": -25, //"DEFAULT_initial_cost_OFFSETPERCENT": -25,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25, //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25,
"DEFAULT_trailing_buy_OFFSETPERCENT": 10, "DEFAULT_trailing_buy_OFFSETPERCENT": 10,
"DEFAULT_trailing_profit_OFFSETPERCENT": -10 "DEFAULT_trailing_profit_OFFSETPERCENT": -10
}, },
"DCAProperties": { "DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10, "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10, "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10,
}, },
"IndicatorsProperties": { "IndicatorsProperties": {
} }
@ -180,14 +180,14 @@
], ],
"PairsProperties": { "PairsProperties": {
"max_trading_pairs_OFFSET": 1, "max_trading_pairs_OFFSET": 1,
//"DEFAULT_initial_cost_OFFSETPERCENT": 10, //"DEFAULT_initial_cost_OFFSETPERCENT": 10,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10, //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10,
"DEFAULT_trailing_buy_OFFSETPERCENT": -10, "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 10 "DEFAULT_A_sell_value_OFFSETPERCENT": 10
}, },
"DCAProperties": { "DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10, "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10, "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10,
}, },
"IndicatorsProperties": { "IndicatorsProperties": {
} }
@ -212,14 +212,14 @@
], ],
"PairsProperties": { "PairsProperties": {
"max_trading_pairs_OFFSET": 2, "max_trading_pairs_OFFSET": 2,
//"DEFAULT_initial_cost_OFFSETPERCENT": 20, //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20, //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
"DEFAULT_trailing_buy_OFFSETPERCENT": -10, "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 20 "DEFAULT_A_sell_value_OFFSETPERCENT": 20
}, },
"DCAProperties": { "DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20, "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20, "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
}, },
"IndicatorsProperties": { "IndicatorsProperties": {
} }
@ -253,9 +253,9 @@
} }
], ],
"PairsProperties": { "PairsProperties": {
"DEFAULT_trading_enabled": false, "DEFAULT_trading_enabled": "false",
"DEFAULT_sell_only_mode_enabled": true, "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_DCA_enabled": false "DEFAULT_DCA_enabled": "false"
} }
}, },
// ----------------------------- // -----------------------------
@ -267,7 +267,7 @@
"MarketTrendName": "1h", "MarketTrendName": "1h",
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = Single market "MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = Single market
// trend compared relative to the market trend // trend compared relative to the market trend
// Absolute = Single market trend viewed on its own // Absolute = Single market trend viewed on its own
"MinChange": 8 "MinChange": 8
}, },
{ {
@ -284,12 +284,12 @@
"OffTriggers": [ "OffTriggers": [
{ {
"HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting "HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting
// for 3 hours, since the last time it triggered. // for 3 hours, since the last time it triggered.
} }
], ],
"PairsProperties": { "PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true, "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_DCA_enabled": false "DEFAULT_DCA_enabled": "false"
} }
}, },
// ----------------------------- // -----------------------------
@ -309,8 +309,8 @@
} }
], ],
"PairsProperties": { "PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true, "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_DCA_enabled": false "DEFAULT_DCA_enabled": "false"
} }
} }
] ]