Download | Wiki

Why doesn't this condition work?


#1

I have a condition to test whether my pending bought cost is getting too large. I’m sure it was working in a previous beta but it doesn’t seem to be working in the latest beta. Obviously, I could just be doing something wrong … :wink:

  "LimitPendingCostGrouping" : {
    "Condition" : "([positions.TotalPendingBoughtCost] / 4) > [positions.RealBalance]",
    "Configs": [
      {
        "Override": {
          "SellOnlyModeEnabled": "true",
          "Weight":  "700" 
        } 
      }
    ]
  },

And on a related note, what is the difference between RealBalance, PairsBalance and DcaBalance supposed to be? They always appear to be the same as written to the properties …


#2

Mmm, thats odd. It looks good to me. What version of PT are you using? I know that Feeder is broken for this functionality for the PT beta. Do you see LimitPendingCost anywhere in your PT config?

The three values should be the values you see here. They change based on keep balance:


#3

I’m on the latest beta: Version 1.7.0.1426.

Actually I think it is working but it’s just not getting written into the comments, i.e. I don’t see ‘LimitPendingCost’ anywhere in my config but the bot is in global SOM - and I don’t have any other triggers that should set it in SOM. I’ve changed it to set SOM when Total pending is greater than Pairs + DCA + Balance :

 "LimitPendingCostGrouping" : {
    "Condition" : "[positions.TotalPendingCurrentValue] > ([positions.TotalDcaCurrentValue] + [positions.TotalPairsCurrentValue] + [positions.RealBalance])",
    "Configs": [
      {
        "Override": {
          "SellOnlyModeEnabled": "true",
          "Weight":  "700" 
        } 
      }
    ]
  },

Ah! Right, so if keep balance is 0 for pairs and DCA then they should be identical … ?


#4

Yep they will be identical if keep balance for DCA is set to 0