# changeProtection()
Changes the position protection.
WARNING
Only explicit values will change the protection, this means that passing an empty protection or omitting certain directives will keep the current protection values active and not change anything
- Interface
class MidaPosition {
changeProtection (directives: MidaProtectionDirectives): Promise<MidaProtectionChange>;
}
- Example 1
await myPosition.changeProtection({
takeProfit: 1000,
stopLoss: 500,
trailingStopLoss: true,
});
- Example 2
await myPosition.changeProtection({
stopLoss: undefined,
});