Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing Stop Loss Thresholds #10

Open
desoss opened this issue Oct 21, 2024 · 1 comment
Open

Trailing Stop Loss Thresholds #10

desoss opened this issue Oct 21, 2024 · 1 comment

Comments

@desoss
Copy link

desoss commented Oct 21, 2024

Hello,
I am trying to configure a trailing stop loss in MetaAPI such that when the price moves to my target direction, the stop loss moves to breakeven and remains there.

However, based on the current configuration, it seems that the stop loss is adjusting multiple times.

Here is my current configuration for the trailing stop loss:

{
	threshold: {
		thresholds: [
			{
				threshold: 1,
				stopLoss: 1
			}
		],
		units: Units.RELATIVE_PRICE,
		stopPriceBase: StopPriceBases.CURRENT_PRICE
	}
}

My expectation is for the stop loss to move to breakeven only after the price moves 1 "relative price" in my target direction and to stay at breakeven. However, it seems that the stop loss is being adjusted multiple times, not just when it's moved to breakeven.

Could you please confirm if this is the intended behaviour and if there’s a way to configure it so that the stop loss only moves to breakeven after a 1 "relative price" move, without further adjustments?

Thank you for your help!

@jwelmac
Copy link

jwelmac commented Oct 24, 2024

I have noticed a similar issue. I ended up writing my own price monitor to adjust the stops reliably. However, it would be great if the core implementation is as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants