Where to save order attributes?

 

Hi all, this is an issue at the design level.

When each order is opened, a calculation is made which returns two take profit levels, these TPs are internals and are differents from the take profit defined in the order at the creation level.

The values of these levels are individuals from each orden.

The issue is the following: where to keep these levels? the idea is comparing these levels against the price for each tick.

I suppose they can be saved in a multidimensional array, but the management of this array can complicate the programming more than necessary.

Any idea about this?

Thanks in advance!

 
 
 

You must write code that can recover (power glitch, reboot, crashed terminal...) Therefor you must either be able to regenerate the levels in a OrderSelect loop (multiple magic numbers, order open price...) or write/read a file (persistent storage).

If the terminal crashes (power glitch, etc) then the global variables will not have been written to disk and will not be valid on restart.

Reason: