Sprint Market - Programically update Stop-Level

1 post / 0 new
Sprint Market - Programically update Stop-Level


I am trying to figure out what is the proper value to implement my own trailing stop-loss when the market moves in a direction every nth pip i want to update my stop-level using API. Please don't mention trailing stop i am already aware of this I plan to increment and also de-crement the stop-level programmatically, trailing stop work in one direction only.

I am not sure what values from the data stream to use to do this when in buy position do i use the L1LsPriceData.Offer price to determine whether or not market has move in a particular direction also if i were in sell position do i use the L1LsPriceData.bid price.

This is the logic i am using if trade was in a buy position take the last stop-Level, and or level if no Stop-Level were set for that position. Please see is this correct, my request to update stop-level are rejected at times.

Buy Position:
((Level/Last Stop-Level) - Current L1LsPriceData.Offer Price) = Pip-Difference

Sell Position:
((Level/Last Stop-Level) - Current L1LsPriceData.Bid Price) = Pip-Difference