Login Page - Create Account

Support Board


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



[User Discussion] - ATS - Not exiting trades after crossing through moving average

View Count: 1319

[2014-04-25 22:28:46]
User26836 - Posts: 4
I am trying to set up an always in moving average based system and keep having issues. Originally the fills were way out of whack with the exits, but now it is pretty much on track, except when the position crosses back through the moving average it doesn't always exit. It seems like if the moving average is relatively flat at the time price crosses through it doesn't reverse the position.

Is there a way to correct this? I added in the function of (moving average +1) and (moving avg -1) in an attempt to keep the system from flipping back and forth several times because this is when it gets out of whack placing trades the wrong way. This helped a little on the frequency of back and forth trades but they are still going in the wrong direction. Any ideas on how to correct this?

Thanks!
Date Time Of Last Edit: 2014-04-25 22:29:09
[2014-04-27 00:19:34]
Sierra Chart Engineering - Posts: 104368
This has been marked as a User Discussion because we cannot help the specifics of an automated trading system, but if the trading system is indeed giving the exit signals and they are being ignored, then for help with that refer to this section here:
https://www.sierrachart.com/index.php?l=doc/doc_SystemsAlerts.php#IgnoredSignals
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: 2014-04-27 00:19:54
[2014-04-27 00:21:45]
Sierra Chart Engineering - Posts: 104368
We are assuming you are using the Spreadsheet Trading study. Another thing when using the CROSSOVER functions, use a range of 3 values:
http://www.sierrachart.com/index.php?l=doc/doc_WorksheetFunctions.html
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
[2014-04-27 18:13:05]
User26836 - Posts: 4
This has been marked as a User Discussion because we cannot help the specifics of an automated trading system

No problem, this isn't anything I am running live or anything along those lines, just a practice setup basically.. I basically copied your example on the site and then was trying to make changes to it. I just want to build off of it and see what I can come up with, I have just been having this one issue on the system not reversing the position.

I will check out both links and see if they help correct it.

Thanks!
[2014-04-28 05:18:50]
User26836 - Posts: 4
Buy Entry - =AND(AA4>E4,E3>AA3)

Sell Entry - =AND(AA4<E4,E3<AA3)

No value in buy exit or sell exit.

It is supposed to be always in just flipping back and forth depending on if price is above or below the moving average. I was using an hourly chart, but instead I went down to a smaller time frame (5 minutes) and just compensated for the moving average like it is on the higher timeframe.

I just don't get why the delay in order fills. On the 5 minute chart after price fell through the moving average, there was a 2 bar delay before the system actually closed out the long and went short. Price fell 4 full pts before it actually filled the order. I just don't get it. Something must be off in my formula, but I have tried quite a few ways with mixed results. It isn't that I am trying to turn this into a strategy so much, I just intend to build off of it and want to figure out what I am doing wrong with my formula to cause these problems.

I checked on the signal ignore on my last round of chart replay, it listed a few times where an order was ignored. They were all because a position already existed in that direction.

Date Time Of Last Edit: 2014-04-28 05:19:23
[2014-04-29 00:05:50]
vegasfoster - Posts: 444
In K3, =AND(E3>AA3, E4<AA4)
In M3, =AND(E3<AA3, E4>AA4)

See pic for the chart settings I am using for crossover signal reversal on bar close with following formulas.

In general 1) when you look at the entry arrows on the chart are they in the correct place? If not, then you know your formulas have an error. 2) are the signals occurring on the same or different bars than the arrows? If set for entry on bar close you will typically see them on the open of the next bar, consider there could be a small gap. 3) If entries are not occurring on same or next bar from the arrow, do the 5-minute bars not have any volume? Someone correct me, but I believe if no trades occurred then nothing will happen in replay.
imageCrossoverReversal.png / V - Attached On 2014-04-28 23:58:45 UTC - Size: 122.98 KB - 360 views
[2014-04-29 05:18:03]
User26836 - Posts: 4
Awesome! Thanks for the reply. I will give it a shot and see how making the changes goes.

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

Login

Login Page - Create Account