Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 22:55:21 +0000



[User Discussion] - Auto Exit Management

View Count: 1267

[2018-04-17 23:37:36]
User153269 - Posts: 7
Hello,

I was wondering if a user could provide coding assistance for using the spreadsheet trading system to automate my exit strategy. I am currently using a custom .dll to autotrade my entries, but I am interested in automating the exit as well. Essentially I want the .dll to enter me into a trade and then for the spreadsheet system to flatten my position when the slope of the 8 period zero lag EMA goes against my position for 2 consecutive bars (calculated on bar close). I am using a 2-1-1 Flex Renko periodicity with the option New Trend Bar When Range Exceeded - New Reversal Bar When Reversal Amount Plus 1 Tick and References Prior Close (not sure if this is relevant but wanted to be thorough).

Due to the Flex Renko periodicity I use, a change in the zero lag slope for 2 bars essentially means 2 bar closes in the opposite direction of my position (so the zero lag EMA may not be relevant as you could just code for the position to flatten with 2 bar closes against my position's direction).

As an example of what I am looking for, my .dll will enter me into a long position and price moves in my favor 6 bars and then pulls back for 2 bars. Once the 2nd bar closes lower I want the position to flatten on close of that bar. Can anybody suggest the proper coding syntax to use with the spreadsheet trading system for exits?

Regards
Date Time Of Last Edit: 2019-01-17 00:15:09
[2018-04-18 16:02:54]
User701453 - Posts: 176
Spreadsheet Example Formulas and Usage
[2018-04-18 16:23:32]
bradh - Posts: 854
I can help you with that. Sent you a PM request.
[2018-04-18 16:25:45]
User153269 - Posts: 7
Accepted the PM request...Thanks

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

Login

Login Page - Create Account