Scripts: CustomStopOut: your own margin call and stop-out levels, worst order closed first

CustomStopOut: your own margin call and stop-out levels, worst order closed first:

A script that sets your own margin call and stop-out levels above the broker's. It alerts when the margin level falls below your margin call level and, below your stop-out level, closes open orders one at a time, the worst net result first, until the level is back up, the way a broker stop-out works.

CustomStopOut: your own margin call and stop-out levels, worst order closed first

Author: George Ciprian Mandache