Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 02:35:42 +0000



[User Discussion] - Spreadsheet Trading in connection with Target/Stop

View Count: 798

[2020-07-04 11:48:22]
User917140 - Posts: 7
I have a question regarding the spreadsheet trading. When the buy entry conditions are met I always have certain target (sell when a certain profit goal is reached) and stop (sell when a certain loss is reached) in place. If one of the the target/stop condition is met often times the respective Buy Entry is still valid so that the trading system buys again.

In my case I use the Parabolic study. For example when the Parabolic is in an uptrend and I reach my profit goal the spreadsheet trading system often buys again because the Buy Entry criteria still match. My goal is to find a solution, that the system waits for the NEXT uptrend to happen instead of using the same trend again.

I'd appreciate any help. Thank you in advance.
[2020-07-04 13:18:21]
Sawtooth - Posts: 3952
Use two Formula Columns to create persistent signals until a trend change, then find the transitions in K3/M3.

For example:
Buy Entry in O3:
=IF(BuyEntryConditions,1,IF(ParabolicDownTrend,0,O4))
Sell Entry in P3:
=IF(SellEntryConditions,1,IF(ParabolicUpTrend,0,P4))

K3:
=AND(O4=0,03=1)
M3:
=AND(P4=0,P3=1)
[2020-07-04 13:36:41]
User917140 - Posts: 7
Thank you for your help. However I think I didn't described my problem good enough.

My buy entry buys a contract as soon as the closing price of the last bar exceeds the parabolic. This works for me. However when I reach my profit target SC flattens the position. And with the next bar closing my buy entry conditions are met again. But I want, that the system waits until the next cycle begins (ParabolicDownTrend->ParabolicUpTrend). Basically I am looking for a way to enter in an Parabolic trend move only once (even though my position is flattened).

As far is I can see your formula does not do this.
Date Time Of Last Edit: 2020-07-04 14:34:54
[2020-07-04 14:49:56]
Sawtooth - Posts: 3952
The formulas will allow just one entry per trend change, assuming your entries are at close of bar.
It is a variation of this concept:
Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals

If your entries are intrabar, you may need to use this method to only allow 1 entry per trend change:
http://www.sierrachart.com/index.php?page=doc/doc_SpreadsheetAdditionalInfo.html#StateLocking
https://www.sawtoothtrade.com/example-9.html

Either way, the goal is to create a persistent signal that only changes once per parabolic trend.
[2020-07-04 15:52:54]
User917140 - Posts: 7
Okay, thank you very much! I have trouble to understand the whole concept behind it though. The entry looks good on the first sight.

However I have trouble with the Buy Exit signal. I just want to sell, when the parabolic trend changed (or my target profit is met-> setting in Attached Order). The exit isn't working in my back tests. Originally I just used "last closing price" < "last parabolic value". With your solution above it does not work anymore.
[2020-07-05 00:12:06]
Sawtooth - Posts: 3952
Use these formula to find the Parabolic trend change:
Start of uptrend:
=AND(ID14.SG1@4>=C4,D3>=ID14.SG1@3)
Start of downtrend:
=AND(ID14.SG1@4<=D4,C3<=ID14.SG1@3)
Where the Parabolic is ID14.

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

Login

Login Page - Create Account