Sorry. I have been away learning another language and I am now a bit mixed up in my previous Zorro knowledge.
The ! mark in the display tells us that a profit has been locked in. What is the function call that detects that? How do I check for this in my code itself? I want to add an extra piece of code as insurance to detect when my script fails to lock in profits so I can tell it to do so.
// sum up closed profits of all assets and the current algo var ProfitSum = 0; for(used_assets) { asset(Asset); // select the current component ProfitSum += ProfitClosed; }
Thanks Kalmar. What I am asking is about the state of the open profits. Once we are trailing an open position and some of the profit has been locked in, the display window shows an exclamation mark. !
I want to be able to check within the code if the open profit is locked in by our trailing stop status. i.e. the same status that is displayed by the !
I am not aware of such functionality, it would be helpful, I was thinking to develop it analyzing the info contained in the trade struct. its on my "never ending" todo list
I was thinking using a TMF: you know all the variables of the specific trade (ENTRY,.. STOP... TRAIL,.... You can make all the required calculations and take actions.