
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Create 2 arrays one that will hold positions tickets of long type and another one of double type that will hold positions profit , you just need to loop through all positions and insert tkt and position profit into the respective array in every iteration . Then using ArrayMin function pass the profits array to it it will return the index of lowest profit in the array . Use this index and select the item in the tickets array using the same index then close the position that has this index
Hi Kareem,
Thank you for this suggestion; I thought about something like that but technicaly i don't know how to code it.
If you can post me some sample of code i should greatly appreciated.