Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 22:08:42 +0000



Post From: ACSIL - trailing stop loss and orders

[2019-09-17 00:09:36]
Chris_uk - Posts: 89
Have you checked the trade activity log to look at the entry and exit times for these trades? They are probably being held overnight and over weekends.

Trade Activity Log

If this is the case, check out sc.FlattenAndCancelAllOrders();

Automated Trading From an Advanced Custom Study: sc.FlattenAndCancelAllOrders

and

ACSIL Programming Concepts: Performing Action When Certain Time is Encountered in Most Recent Chart Bar

This will allow you to flatten and cancel orders at a predetermined time to prevent this from happening.

It is also possible to do this with the Trade Window:

Basic Trading and the Trade Window: A >> Flatten And Cancel at Set Time

Cheers,
Chris
Date Time Of Last Edit: 2019-09-17 00:19:45