Changed trigger Letter to Tag
This commit is contained in:
parent
a54f819182
commit
f54109a3b3
|
@ -201,7 +201,7 @@ namespace Core.Main.DataObjects.PTMagicData
|
||||||
public class Trigger
|
public class Trigger
|
||||||
{
|
{
|
||||||
[DefaultValue("")]
|
[DefaultValue("")]
|
||||||
public string Letter { get; set; } = "";
|
public string Tag { get; set; } = "";
|
||||||
|
|
||||||
[DefaultValue("")]
|
[DefaultValue("")]
|
||||||
public string MarketTrendName { get; set; } = "";
|
public string MarketTrendName { get; set; } = "";
|
||||||
|
@ -228,7 +228,7 @@ namespace Core.Main.DataObjects.PTMagicData
|
||||||
public class OffTrigger
|
public class OffTrigger
|
||||||
{
|
{
|
||||||
[DefaultValue("")]
|
[DefaultValue("")]
|
||||||
public string Letter { get; set; } = "";
|
public string Tag { get; set; } = "";
|
||||||
|
|
||||||
[DefaultValue("")]
|
[DefaultValue("")]
|
||||||
public string MarketTrendName { get; set; } = "";
|
public string MarketTrendName { get; set; } = "";
|
||||||
|
|
|
@ -1344,7 +1344,7 @@ namespace Core.Main
|
||||||
{
|
{
|
||||||
double averageMarketTrendChange = this.AverageMarketTrendChanges[marketTrend.Name];
|
double averageMarketTrendChange = this.AverageMarketTrendChanges[marketTrend.Name];
|
||||||
bool isTriggered = averageMarketTrendChange >= trigger.MinChange && averageMarketTrendChange < trigger.MaxChange;
|
bool isTriggered = averageMarketTrendChange >= trigger.MinChange && averageMarketTrendChange < trigger.MaxChange;
|
||||||
triggerResults[trigger.Letter] = isTriggered;
|
triggerResults[trigger.Tag] = isTriggered;
|
||||||
|
|
||||||
if (isTriggered)
|
if (isTriggered)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,20 +71,20 @@
|
||||||
{
|
{
|
||||||
"SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting
|
"SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting
|
||||||
"TriggerConnection": "AND", // Define if triggers will be connected by AND or OR.
|
"TriggerConnection": "AND", // Define if triggers will be connected by AND or OR.
|
||||||
//If you give each trigger a letter, then you can use more robust boolean logic, such as: (A && B) || (B && C)
|
//If you give each trigger a Tag, then you can use more robust boolean logic, such as: (A && B) || (B && C)
|
||||||
"Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above
|
"Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above
|
||||||
{
|
{
|
||||||
"Letter": "A", // OPTIONAL: Give your triggers letters, so you can use more robust boolean logic, such as: (A && B) || (C && D)
|
"Tag": "A", // OPTIONAL: Give your triggers Tags, so you can use more robust boolean logic, such as: (A && B) || (C && D)
|
||||||
"MarketTrendName": "1h", // Reference to the market trend specified above
|
"MarketTrendName": "1h", // Reference to the market trend specified above
|
||||||
"MaxChange": 0 // The maximum value for this trigger. (Any value below "0" will trigger this)
|
"MaxChange": 0 // The maximum value for this trigger. (Any value below "0" will trigger this)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "B",
|
"Tag": "B",
|
||||||
"MarketTrendName": "12h",
|
"MarketTrendName": "12h",
|
||||||
"MaxChange": -2
|
"MaxChange": -2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "C",
|
"Tag": "C",
|
||||||
"MarketTrendName": "24h",
|
"MarketTrendName": "24h",
|
||||||
"MaxChange": -5
|
"MaxChange": -5
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
"TriggerConnection": "A || B || C",
|
"TriggerConnection": "A || B || C",
|
||||||
"Triggers": [
|
"Triggers": [
|
||||||
{
|
{
|
||||||
"Letter": "A",
|
"Tag": "A",
|
||||||
"MarketTrendName": "1h",
|
"MarketTrendName": "1h",
|
||||||
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = The trend of the coin market
|
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = The trend of the coin market
|
||||||
// is compared to the average trend of all other coins in the market market.
|
// is compared to the average trend of all other coins in the market market.
|
||||||
|
@ -284,13 +284,13 @@
|
||||||
"MinChange": 8
|
"MinChange": 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "B",
|
"Tag": "B",
|
||||||
"MarketTrendName": "12h",
|
"MarketTrendName": "12h",
|
||||||
"MarketTrendRelation": "Relative",
|
"MarketTrendRelation": "Relative",
|
||||||
"MinChange": 10
|
"MinChange": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "C",
|
"Tag": "C",
|
||||||
"MarketTrendName": "24h",
|
"MarketTrendName": "24h",
|
||||||
"MarketTrendRelation": "Relative",
|
"MarketTrendRelation": "Relative",
|
||||||
"MinChange": 12
|
"MinChange": 12
|
||||||
|
|
|
@ -71,20 +71,20 @@
|
||||||
{
|
{
|
||||||
"SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting
|
"SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting
|
||||||
"TriggerConnection": "AND", // Define if triggers will be connected by AND or OR.
|
"TriggerConnection": "AND", // Define if triggers will be connected by AND or OR.
|
||||||
//If you give each trigger a letter, then you can use more robust boolean logic, such as: (A && B) || (B && C)
|
//If you give each trigger a Tag, then you can use more robust boolean logic, such as: (A && B) || (B && C)
|
||||||
"Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above
|
"Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above
|
||||||
{
|
{
|
||||||
"Letter": "A", // OPTIONAL: Give your triggers letters, so you can use more robust boolean logic, such as: (A && B) || (C && D)
|
"Tag": "A", // OPTIONAL: Give your triggers Tags, so you can use more robust boolean logic, such as: (A && B) || (C && D)
|
||||||
"MarketTrendName": "1h", // Reference to the market trend specified above
|
"MarketTrendName": "1h", // Reference to the market trend specified above
|
||||||
"MaxChange": 0 // The maximum value for this trigger. (Any value below "0" will trigger this)
|
"MaxChange": 0 // The maximum value for this trigger. (Any value below "0" will trigger this)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "B",
|
"Tag": "B",
|
||||||
"MarketTrendName": "12h",
|
"MarketTrendName": "12h",
|
||||||
"MaxChange": -2
|
"MaxChange": -2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "C",
|
"Tag": "C",
|
||||||
"MarketTrendName": "24h",
|
"MarketTrendName": "24h",
|
||||||
"MaxChange": -5
|
"MaxChange": -5
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
"TriggerConnection": "A || B || C",
|
"TriggerConnection": "A || B || C",
|
||||||
"Triggers": [
|
"Triggers": [
|
||||||
{
|
{
|
||||||
"Letter": "A",
|
"Tag": "A",
|
||||||
"MarketTrendName": "1h",
|
"MarketTrendName": "1h",
|
||||||
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = The trend of the coin market
|
"MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = The trend of the coin market
|
||||||
// is compared to the average trend of all other coins in the market market.
|
// is compared to the average trend of all other coins in the market market.
|
||||||
|
@ -284,13 +284,13 @@
|
||||||
"MinChange": 8
|
"MinChange": 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "B",
|
"Tag": "B",
|
||||||
"MarketTrendName": "12h",
|
"MarketTrendName": "12h",
|
||||||
"MarketTrendRelation": "Relative",
|
"MarketTrendRelation": "Relative",
|
||||||
"MinChange": 10
|
"MinChange": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Letter": "C",
|
"Tag": "C",
|
||||||
"MarketTrendName": "24h",
|
"MarketTrendName": "24h",
|
||||||
"MarketTrendRelation": "Relative",
|
"MarketTrendRelation": "Relative",
|
||||||
"MinChange": 12
|
"MinChange": 12
|
||||||
|
|
Loading…
Reference in New Issue