Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 09:38:46 +0000



[User Discussion] - Always in - Reversal

View Count: 1299

[2014-04-20 08:01:42]
User56097 - Posts: 5
I followed the example automated trading strategy from the site, but have run into an issue. I want the system to close out the current position and then immediately place one the other way when it is triggered.

In other words, when price crosses above the moving average go long, and when price falls below then go short. It only closes out the order currently but does not flip the other way. I tried adjusting the reversal setting as well but no luck. Also, kind of peculiar, while backtesting if a trade went pretty far in my favor, the autotrade system would close out the position instead of just letting it ride until the exit/reversal signal is triggered.

I mainly just want to figure out how to properly reverse though so I can move on and start adding/learning more.

Thanks!
Date Time Of Last Edit: 2014-04-20 08:02:13
[2014-04-20 15:29:48]
Sawtooth - Posts: 4120
Try this:

-Set 'Support Reversals' to Yes, and only put formulas in K3 and M3. Leave L3 and N3 blank.

K3:
=AND(AA4>E4,E3>AA3)
M3:
=AND(AA4<E4,E3<AA3)
where the MA is in column AA.

If you are using Attached Orders, you must also:
-set 'Cancel All Orders On Entries and Reversals' to Yes
-set 'Allow Entry With Working Orders' to Yes
Date Time Of Last Edit: 2014-04-20 18:00:33
[2014-04-21 05:44:22]
User56097 - Posts: 5
Thanks, Tom! You are the man.
[2014-04-21 06:03:01]
User56097 - Posts: 5
Tom,

The fix you suggested corrected just about all the issues I was having, but I just came across two more.

I just ran another backtest and thought everything looked good, but then realized it was occasionally not showing trades until well after the criteria for a fill were met. I must have some setting or something slightly off, this should be simple. If price is above the MA then long and below then short. Always in.

One other problem is if price went 1 or 2 ticks below the moving average and it went short then price went right back up through the average, it stayed in a short position until the line was tested again. It looks like I might need to include more detailed info in the spreadsheet pertaining to handling the orders.


Date Time Of Last Edit: 2014-04-21 06:04:32
[2014-04-21 13:16:35]
Sawtooth - Posts: 4120
It sounds like you are using a bar type that requires tick data, but you only have minute data.
Do the timestamps of each bar have seconds, or just :00?

Go to Global Settings >> Data/Trade Service Settings >> Intraday Data Storage Time Unit and choose 1 Tick.
Then go to Edit >> Delete All Data and Download.

[2014-04-23 04:03:20]
User56097 - Posts: 5
Thanks again, Tom. That helped with the issue. I might send you an email soon for some help with an idea that is a little more in depth than I know how to do. Nothing real complicated though.

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

Login

Login Page - Create Account