charting-library-examples icon indicating copy to clipboard operation
charting-library-examples copied to clipboard

Undo/Redo buttons affect positions and orders

Open money-development opened this issue 1 year ago • 5 comments

Undo/Redo buttons affect positions and orders

Description: When using the Undo button on TradingView charts, positions and orders are treated as user drawings and get deleted. Pressing Redo does not restore them

Expected Behavior: Positions and orders should not be affected by the Undo and Redo buttons

Steps to Reproduce: Open a TradingView chart Place a position or order Press Undo – the position/order is deleted Press Redo – the position/order is not restored

https://github.com/user-attachments/assets/19f68b91-c5a2-43b7-9b1e-d49408b8ff7f

money-development avatar Jan 10 '25 11:01 money-development

Thanks for raising this issue - as a coincidence that was fixed this very week and should be released end of this month with the next release.

SimonMorda avatar Jan 10 '25 11:01 SimonMorda

Perhaps the problem is in the fact that orders and positions are not created immediately inside the "onChartReady" callback issue

money-development avatar Jan 10 '25 11:01 money-development

@SimonMorda Hello. Any news about release?

money-development avatar Jan 30 '25 15:01 money-development

@timocov same here, any updates on this?

sinantalhakosar avatar May 27 '25 09:05 sinantalhakosar

That shouldn't be the case anymore. Any lines created using createPositionLine or createOrderLine should no longer change the behaviour of the undo/redo buttons.

SimonMorda avatar May 27 '25 15:05 SimonMorda