These scripts achieve these goals:
- Normally a stoploss order gets trigerred based on the last trade price. These scripts will create a stoposs order in DAS Trader such that it gets trigerred based on the Ask or the Bid (although it can be modified to use the last trade price for the trigger).
- The scripts will break a big order into multiple smaller orders of the desired size. For example, if we have 30k shares and we want to exit the full position once the stop is trigerred and we want to execute the order in the chunks of 4k shares, then the script will automatically do this. Some brokers some times take a long time to process a large order, so breaking into smaller chunks solves this problem.
- When you add to an existing position, then the stoploss order does not need to be updated as it reads the position size when the stop is trigered and not when it is created.