Support Board
Date/Time: Thu, 16 Jan 2025 07:49:34 +0000
backtest using trade management by study and Bars since entry
View Count: 1172
[2017-10-21 19:16:22] |
vectorTrader - Posts: 86 |
I have a strategy that I am looking to test on Sierra chart(daily historical chart, continuous back adjusted) I have successfully tested in python but I cannot seem to get the stops to function correctly. I have 2 types of exits- One that is controlled by my custom study and the other by the Trade Management study using Highest High/Low study. It seems that when I run the historical back test, the system is not entering any stops at all. Does his study function in historical bar based back tests? I would assume that if is doesn't, I will have to manually have the stop controlled from within the study. Also, I have notice that sc.GetBarsSinceLastTradeOrderEntry() & sc.GetBarHasClosedStatus() do not always play nice in the backtests. I was getting trades and then it would suddenly stop. Once I removed, sc.GetBarHasClosedStatus() the study functioned fine. Please advise. |
[2017-10-23 16:41:58] |
Sierra Chart Engineering - Posts: 104368 |
The Trade Management by Study study does work during a bar-based practice. To verify this, when you run the bar based back test, use a smaller Bar Processing Increment like 10 to see updates more often and notice that the stop order is moving. Also here is the documentation for that study: Attached Orders: Study Controlled Targets and Stops Also, I have notice that sc.GetBarsSinceLastTradeOrderEntry() & sc.GetBarHasClosedStatus() do not always play nice in the backtests. I was getting trades and then it would suddenly stop. Once I removed, sc.GetBarHasClosedStatus() the study functioned fine.
There is no way we can possibly answer this. This is something that you need to debug. Refer to:Automated Trading Management: Troubleshooting Automated Trading System Behavior Also the source code for that function can be found within SierraChart.h file. You can see exactly what it does. It does function correctly as designed. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-10-23 16:42:56
|
To post a message in this thread, you need to log in with your Sierra Chart account: