Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 16:38:52 +0000



Post From: Auto Exit Management

[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