Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 01:46:19 +0000



[Programming Help] - Percentage based stop and take profit in ASCIL

View Count: 121

[2024-09-14 01:21:36]
User959673 - Posts: 1
Does SierraChart support setting percentage-based take profit and stop loss orders directly through ACSIL? If so, what are the specific functions or methods used to implement this? I'm looking to set take profit and stop loss levels as a percentage of my entry price in my custom ACSIL studies. Any code examples or documentation references would be greatly appreciated.
[2024-09-14 18:10:18]
ondafringe - Posts: 283
Even if they don't, using ACSIL, just code it and track it yourself. When price hits the profit/stop percentage, have your study close the position.
Date Time Of Last Edit: 2024-09-14 18:16:08
[2024-09-15 02:54:23]
User61168 - Posts: 403
No need for ASCIL. just a 30 second solution via Flatten using simple alert formula :-)

Flatten trades at specific time - Market Replay | Post: 393994

Example: for take profit when profit reaches 1% of entry price
=OR(AND(ID7.SG1>0,C>=ID9.SG1+ID9.SG1*0.01),AND(ID7.SG1<0,C<=ID9.SG1-ID9.SG1*0.01))

ID7 = position qty
ID9 = Average position price

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account