Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 06:25:15 +0000



[Programming Help] - Immediate entry/exit in spreadsheet system

View Count: 1603

[2019-04-09 21:44:20]
User917679 - Posts: 76
I would sometimes have my position exits execute immediately after entering w/ a discrepancy of .004;

The position opens at "0.003" after the bar and closes at "0.007" right after(I'll provide an image)..

I do have "Signal only on bar close L - N/Z" selected and I'm thinking there might be some type of timing problem

Any suggestions on how to fix this issue? Is there a way to change the time at which an entry executes after a new bar is put in session(instead of it being 0.003 all the time)?
imagetiming.png / V - Attached On 2019-04-09 21:41:28 UTC - Size: 37.6 KB - 349 views
[2019-04-09 22:23:03]
Sawtooth - Posts: 3976
Are you trying to buy at the open then sell at the close of the same bar?
[2019-04-09 23:02:23]
User917679 - Posts: 76
Not really,

It just so happened that the previous bar closed its position(and is set to exit on bar close), and the present bar has an open at whenever opening conditions are met(in this case ~6min after 13:30 bar opening)..

Not sure if the previous bar closing is related to the issue, but I suspect it is...
[2019-04-09 23:37:38]
Sawtooth - Posts: 3976
If your entries are intrabar, and your exits are at close of bar, try this for entries:
=AND(YourEntryConditions,$J$8=0)
This will cause the entry to wait until you are flat from the previous bar's exit at its close.
[2019-04-10 00:49:55]
User917679 - Posts: 76
Thanks

This bit is definitely helpful - I wish I had known this earlier as I had developed a long-winded workaround to resolve a prior problem that could have been simply fixed by this(lol)

But for some reason, the immediate close at the spot depicted in the image seems to persist;

Like I said, I worked around the problem at bar beginnings/endings, but now the situation rises all throughout the bar wherever there is an opening

Edit:

Finally worked it all out - enabling "Strict Signal Only On Bar Close Evaluation" was necessary I think.

Thanks again.
Date Time Of Last Edit: 2019-04-11 20:38:42
[2019-11-07 13:24:44]
j4ytr4der_ - Posts: 914
I'm having this precise issue (the immediate exits after opening) in an alert based system. I can't enable strict mode since it's not a spreadsheet system. Anyone have any ideas on how to overcome this on a simple alert system?

Also, these strange instant open/close trades always seem to happen at the very first trade-able bar, meaning since I have enabled "Allow Trading Only During Time Range", there is usually a trade in the first bar that is within the start and end time that closes 0.004 seconds after opening, even if there was no valid entry signal for that bar.
Date Time Of Last Edit: 2019-11-07 14:39:39
[2019-11-07 14:53:40]
j4ytr4der_ - Posts: 914
I just did a replay from 5am this morning, using Calculate At Every Tick/Trade, and sure enough as soon as the 5:00 am Renko brick closed (5am is my start time to allow trading), a trade suddenly appeared that opened and closed nearly simultaneously, 1 tick apart, towards the *top* of the bar. It did not happen until the brick closed. I'm thoroughly confused here.
Date Time Of Last Edit: 2019-11-07 14:57:35

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

Login

Login Page - Create Account