0 MinChange & MaxChange
HojouFotytu edited this page 2021-01-06 11:40:43 +09:00

As some people may get confused by the variables called MinChange and MaxChange in our triggers in settings-analyzer.json we want to explain these two variables and give some usage examples.

In general MinChange and MaxChange are working as limits for our triggers. It is easy to get confused by the names of the settings. MaxChange means anything below the value will be true, while MinChange means anything above the value will be true. Think of it this way: MaxChange = "what is the maximum allowed for the trigger to be true," or MinChange = "what is the minimum allowed for the trigger to be true."

Here is an example taken from our default settings of PT Magic for the global setting "BearSighted".

Example:

"TriggerConnection": "AND",
"Triggers": [
          {
            "MarketTrendName": "Exchange1h",
            "MaxChange": 1
          },
          {
            "MarketTrendName": "Exchange12h",
            "MaxChange": 0
          },
          {
            "MarketTrendName": "Exchange24h",
            "MaxChange": -1,
            "MinChange": -3
          }
        ],

Consider the trigger for the trend "Exchange24h". As you can see, MinChange is set to -3% and MaxChange is set to -1%. So the "bracket" for this trigger to be matched is from -3% up to -1%.

This means that whenever the overall trend for "Exchange24h" is between -3% and -1% it will match this trigger.

Examples for Exchange24h

Exchange24h trend is at -2.5% => Match!
Exchange24h trend is at -1.1% => Match!
Exchange24h trend is at -0.9% => NO Match!
Exchange24h trend is at -5% => NO Match!

Pretty simple, right?

Ok so let's stick to the example shown above and see when all triggers will match:

Example 1

Exchange1h trend is at -0.5% => Match!
Exchange12h trend is at -0.75% => Match!
Exchange24h trend is at -2.5% => Match!

Result: Match!

Example 2

Exchange1h trend is at 0.9% => Match!
Exchange12h trend is at -15% => Match!
Exchange24h trend is at -2.5% => Match!

Result: Match!

Example 2

Exchange1h trend is at 1.5% => NO Match!
Exchange12h trend is at -1% => Match!
Exchange24h trend is at -2.5% => Match!

Result: NO Match!

Example 3

Exchange1h trend is at -1% => Match!
Exchange12h trend is at -1% => Match!
Exchange24h trend is at -5% => NO Match!

Result: NO Match!