Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 04:57:19 +0000



[User Discussion] - Spreadsheet for trading How do I modify an entry

View Count: 2338

[2013-04-24 01:28:36]
User268601 - Posts: 28
I’m working on a spreadsheet automated trading system where, when the conditions are met, a buy entry or sell entry order executes on the open of the next bar. I’d like to know if there’s a way to modify this so that the order doesn’t execute on the open of this new bar but rather it executes (hopefully) 5 ticks in my favor for either the long or short side.
[2013-04-24 02:44:57]
Sawtooth - Posts: 4120
You could use Buy Limit and Sell Limit entries with formulas in J22 and J24, and J71 and J73 set to L. Then use a formula in J27 to cancel the pending order if it doesn't trigger.
Date Time Of Last Edit: 2013-04-25 03:24:58
[2013-04-24 03:22:17]
User268601 - Posts: 28
Thank you very much for your reply, I truly appreciate it. What formulas would I use for J 22, 24 and 27?
[2013-04-24 23:10:46]
Sawtooth - Posts: 4120
Without knowing the details of your system, it would be difficult to suggest formulas for J22, J24, J27.

Another maybe simpler possibility is to set the Signal Only On Bar Close to No, and have all of your row 3 formulas reference row 4.


[2013-04-25 01:12:01]
User268601 - Posts: 28
In K3 I have the formula =AND(crossfrombelow(E3:E5,AG3:AG5)) for a long entry

and in M3 =AND(crossfromabove(E3:E5,AI3:AI5)) for a short entry. I'm using attached orders for exits.

The system executes on the open of the next bar when the conditions are met. As mentioned above, instead of taking the opening price, I would like to set the order for 5 ticks below a long signal and 5 ticks above a short signal.
[2013-04-25 03:39:00]
Sawtooth - Posts: 4120
Try this:

Set 'Signal Only On Bar Close (K,M)' to No
Set 'Signal Only Once Per Bar' to Yes

K3:
=AND(crossfrombelow(E4:E6,AG4:AG6),E4-E3>=$J$21*5)
M3:
=AND(crossfromabove(E4:E6,AI4:AI6),E3-E4>=$J$21*5)

With the above, you won't need formulas in J22, J24, J27.

Sorry, I did not have time to test it.
[2013-04-25 06:13:04]
User268601 - Posts: 28
I definitely appreciate your help! The changes worked but didn't give the results I was hoping for. So, I'd like to ask a different question,which is: with my original settings, how would I stop an order from going through, long or short, if the volume hits 4500 on the bar previous to the bar that gets the signal? In other words, as we know, an order is sent on the open of a new bar when the conditions are met. How could I cancel that order on this new bar if the previous bar's volume hits 4500?
[2013-04-25 12:29:33]
Sawtooth - Posts: 4120
Including a volume reference in the formulas in post #6:

K3:
=AND(crossfrombelow(E4:E6,AG4:AG6),E4-E3>=$J$21*5,F4<4500)
M3:
=AND(crossfromabove(E4:E6,AI4:AI6),E3-E4>=$J$21*5,F4<4500)

This will only enter during the current bar, so if this is acceptable, there is nothing to cancel.

What results are you looking for, that the above didn't produce?

If you want to use your original formulas, Signal Only On Bar Close will need to be set to Yes, and you'll need formulas in J22, J24, J27, and J71, J73 set to L for Limit. Also, this will usually require price to trade through the Limit price; there is no MIT functionality. Are you using J22 and J24?


[2013-04-25 20:22:28]
User268601 - Posts: 28
No I am not using J22 and 24. and the results I was thinking would occur would be fewer losses but I was wrong!

One more thing I'd like to explore would be different target amounts for long and short trades. Meaning, how would I program the system to have a target of 5 ticks for short trades and 7 ticks for long trades?

I appreciate the time you took to help me with all of the above and believe it or not I actually learned some things.
It's a good day. Now hopefully once I get the settings right I will be able to actually rely on the systems results to a high degree
[2013-04-26 13:26:31]
Sawtooth - Posts: 4120
J21 is the tick size, so use the appropriate multiplier in the formula:

E3-E4>=$J$21*7

E4-E3>=$J$21*5


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

Login

Login Page - Create Account