Mida icon indicating copy to clipboard operation
Mida copied to clipboard

Error setStopLoss

Open eritondev-stack opened this issue 3 years ago • 5 comments

Hello, how are you? I have error in my code, when I try set stop loss, follow error below:

Captura de tela 2022-08-19 152909

you can help me?

Thanks!

eritondev-stack avatar Aug 19 '22 18:08 eritondev-stack

Hi! What version of Mida are you using? You are using Mida with cTrader? In that case what version of the plugin are you using?

Vasile-Peste avatar Aug 19 '22 19:08 Vasile-Peste

image

eritondev-stack avatar Aug 19 '22 19:08 eritondev-stack

Yes, I'm using mida with Ctrader!

image

eritondev-stack avatar Aug 20 '22 22:08 eritondev-stack

Thank you for letting me know! I'm investigating. In the meanwhile you can try using changeProtection() instead of setStopLoss() and let me know if the issue persists? Thank you!

  • Example
const stop = 1.01045;

await position.changeProtection({ stopLoss: stop, });

Vasile-Peste avatar Aug 20 '22 22:08 Vasile-Peste

Vasile, I use "changeProtection", I work to me!!! Fix error it.

Thanks for helping!!!

eritondev-stack avatar Aug 22 '22 15:08 eritondev-stack