Update config
This commit is contained in:
@@ -666,7 +666,7 @@ public class TradingBot : Bot, ITradingBot
|
||||
$"Signal {signal.Identifier} will wait for position to become profitable before flipping.");
|
||||
|
||||
// Keep signal in waiting status to check again on next execution
|
||||
SetSignalStatus(signal.Identifier, SignalStatus.WaitingForPosition);
|
||||
SetSignalStatus(signal.Identifier, SignalStatus.Expired);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1180,6 +1180,7 @@ public class TradingBot : Bot, ITradingBot
|
||||
MaxLossStreak = Config.MaxLossStreak,
|
||||
MaxPositionTimeHours = Config.MaxPositionTimeHours ?? 0m,
|
||||
FlipOnlyWhenInProfit = Config.FlipOnlyWhenInProfit,
|
||||
CloseEarlyWhenProfitable = Config.CloseEarlyWhenProfitable,
|
||||
};
|
||||
BotService.SaveOrUpdateBotBackup(User, Identifier, Config.BotType, Status, JsonConvert.SerializeObject(data));
|
||||
}
|
||||
@@ -1202,6 +1203,7 @@ public class TradingBot : Bot, ITradingBot
|
||||
MaxLossStreak = data.MaxLossStreak,
|
||||
MaxPositionTimeHours = data.MaxPositionTimeHours == 0m ? null : data.MaxPositionTimeHours,
|
||||
FlipOnlyWhenInProfit = data.FlipOnlyWhenInProfit,
|
||||
CloseEarlyWhenProfitable = data.CloseEarlyWhenProfitable,
|
||||
Name = data.Name
|
||||
};
|
||||
|
||||
@@ -1429,7 +1431,8 @@ public class TradingBot : Bot, ITradingBot
|
||||
MaxPositionTimeHours = Config.MaxPositionTimeHours,
|
||||
FlipOnlyWhenInProfit = Config.FlipOnlyWhenInProfit,
|
||||
FlipPosition = Config.FlipPosition,
|
||||
Name = Config.Name
|
||||
Name = Config.Name,
|
||||
CloseEarlyWhenProfitable = Config.CloseEarlyWhenProfitable
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1453,4 +1456,5 @@ public class TradingBotBackup
|
||||
public int MaxLossStreak { get; set; }
|
||||
public decimal MaxPositionTimeHours { get; set; }
|
||||
public bool FlipOnlyWhenInProfit { get; set; }
|
||||
public bool CloseEarlyWhenProfitable { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user