Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 04:15:50 +0000



Spreadsheet: Identifying Long / Short Winning / Losing trades

View Count: 509

[2022-06-06 19:44:39]
User103448 - Posts: 69
Hello together,

in the spreadsheet study there are cells like J51/50 to read total win or lose trades. Im looking for the information of, winning/losing splitted by long or short trades.

Any help regarding this?

Best regards!
[2022-06-06 20:33:28]
Sawtooth - Posts: 3976
Unfortunately, this is not supported.

There is no cell that outputs those data.
There is no Trading: study that outputs those data.

J54/J55 counts Long and Short trades, but that's as close as it gets.
[2022-06-06 20:48:08]
User103448 - Posts: 69
Thanks @tomgilb.

The reason i am asking is, that for my automated system i want to allow only 1 losing trade for both sides ( long or short).
Any Idea how to solve this?

Do i have to setup two spreadsheets?
[2022-06-07 02:40:26]
Sawtooth - Posts: 3976
Do i have to setup two spreadsheets?

I can think of a possible way, but it's complicated, and fraught with issues and potential #CREF errors.

Separate spreadsheet studies would probably be the easier option.
[2022-06-10 13:22:23]
User103448 - Posts: 69
@Tomgilb

do you have any idea why a SELL EXIT is ignored, when using "L" Orders in Cell J72/74?

I have a time range highlight study, where all trades should be closed. This is referenced in SELL EXIT Cell as followed:

=OR(AND($J$8 < 0,AS@$3>1),AND($J$8<0,$J$9-3),AND($J$8 < 0,AU@$3>1))

Where AS Column stands for the above mentioned Study. Why are Sell EXIT Signals being ignored? ALso AND($J$8<0,$J$9-3), doesnt work anymore.
[2022-06-10 14:03:22]
Sawtooth - Posts: 3976
do you have any idea why a SELL EXIT is ignored, when using "L" Orders in Cell J72/74?
You'll also need prices in J23/J25.

Also AND($J$8<0,$J$9-3) doesnt work anymore.
You need to compare a price with J9-3:
=AND($J$8<0,E3<=$J$9-3)

Notes:
- When using alphanumeric column/row references, you don't need the @ symbol.
- You should reference study outputs with this format instead of an alphanumeric reference:
Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study
[2022-06-10 14:22:59]
User103448 - Posts: 69
Hey Tom.

Thanks for your quick reply.I will have alook at the documentation.

I forgot to reenter the comparison value for the Trigger.

Limit order for exit is placed, but position is not exited when J9 > +15.

Also =OR(AND($J$8 < 0,AS$3>1) is not triggered
Date Time Of Last Edit: 2022-06-10 14:28:42
imageTG2.jpg / V - Attached On 2022-06-10 14:22:49 UTC - Size: 395.41 KB - 88 views
[2022-06-10 15:08:50]
Sawtooth - Posts: 3976
If N3 never went to 0, then there will not be a new trigger.

I don't think you need an absolute reference to AS3.
[2022-06-10 15:16:29]
User103448 - Posts: 69
Thats correct N3 Stays 0, isnt there a way to place a stop loss order simultaneously to the limit order placed when N3 becomes true the first time??

AS3 is just a filter to allow the trade, within a certain time. I know Timeframe can be controlled by J85 but its just more to understand if the filter is respected by the trigger rules.
[2022-06-10 15:52:11]
Sawtooth - Posts: 3976
isnt there a way to place a stop loss order simultaneously to the limit order placed when N3 becomes true the first time??
Do you want to use SL in stead of L ?
[2022-06-10 16:08:18]
User103448 - Posts: 69
My intention is as followed:

When Trigger comes true,
Enter via Market Order
Set Target Limit Order
Set Stop Loss Order.


Within in the trigger, there are different filters, referenced from color bar based on alert condition or other studies. Things like Timerange, Beeing above or below VWAP and so on.
When i Use attached Orders, the filters defined in the EXIT Cells wont work anymore.
[2022-06-10 20:26:05]
Sawtooth - Posts: 3976
Suggestion:

1. Use Attached Orders and set J72/J74 to M. Don't use L3/N3 to set a stoploss price.

2. Set your initial target and stoploss offsets in J80/J81. These offsets from the entry price are in points, not ticks.

3. Add the Trade Management by Study study, referencing a spreadsheet Formula Column/subgraph that returns the calculated stoploss price.
You can use two instances, and two Formula Columns, one for longs and one for shorts.
This study will move the Attached Order stop to the calculated price.
Attached Orders: Study Controlled Targets and Stops

4. Use a formula like this in J28, instead of your reference to the Time Range Highlight study:
=AND(J8=0,OR(FRACTIME(J41)<TIMEVALUE("09:30:00"),FRACTIME>TIMEVALUE("16:00:00")))
This formula will disallow entries outside of its window, but allow exits after the end time.

5. If you use L3/N3 for any other exit condition, set 'Cancel All Working Orders On Exit' to Yes.
Optional: you could instead use OR(...) and combine this formula with the one in J29.

6. Use J29 for a flatten time, like this:
=FRACTIME(J41)>TIMEVALUE("16:14:00")
The time here needs to be >= the end time in J28.
Date Time Of Last Edit: 2022-06-10 22:35:57

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

Login

Login Page - Create Account