Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 01:05:03 +0000



Cross above negative value??

View Count: 1695

[2017-03-21 05:02:45]
tunah - Posts: 16
Hi, I'm trying to create an alert when a study crosses above a value which happens to be negative and it doesn't seem to be working.

Values from zero and up work fine, but sierra chart seems to read the negative value as positive.

Here's the formula I'm using:

=CROSSFROMBELOW(ID10.SG1, -0.4)

What am I missing?

I looked on the formulas and operators reference but didn't find anything.


Thanks in advance.
[2017-03-21 05:17:30]
tunah - Posts: 16
This seems to have worked:

=AND(ID10.SG1[-1] < -0.4, ID10.SG1[0] > -0.4)

would still like to know if it's possible to work with negative numbers using CROSSFROM


Thanks!
[2017-03-21 18:08:56]
Sierra Chart Engineering - Posts: 104368
We are not seeing a problem with this. We will put together an example for you showing this does work with the MACD study.
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: 2017-03-22 05:51:02
[2017-03-22 04:02:50]
Sierra Chart Engineering - Posts: 104368
The attached Study Collection provides a working example.

Follow the instructions here to use this Study Collection:
How to Use an Advanced Custom Study or a Study Collection: How to Use a Study Collection

The Study Collection uses the Color Bar Based on Alert Condition study to color the bars when the condition is met.
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: 2017-03-22 05:51:57
attachmentCrossFromBelowNegativeValue.StdyCollct - Attached On 2017-03-22 04:00:28 UTC - Size: 28 KB - 344 views
[2017-03-23 22:45:59]
tunah - Posts: 16
Thank you very much, it works with the macd and I suspect it probably would work with stochastic as well.

I'm working with LR Slope and for some reason it's kind of buggy.

For example, in one instance it would not plot for a cross above -.1 but it would plot with -.099 instead. I don't see any reason why it shouldn't plot with any value... Perhaps it's a bug?

For the moment I'm making it work for what I need it to do.

One quick question... In the spreadsheet study for trading is there any way offset a limit order by x ticks from market at the time of trigger?


Many thanks!
Date Time Of Last Edit: 2017-03-23 22:47:16
[2017-03-23 23:02:02]
tunah - Posts: 16
For limit entry offset in spreadsheet trading, I figure just doing the math on column J22 and J24, reference price +/- actual dollar amount equivalent of ticks, say .50 for two ticks on the /ES, would that work?

Thanks
[2017-03-23 23:17:24]
Sierra Chart Engineering - Posts: 104368
There definitely is no bug. You just need to understand that the CROSS functions use the actual values and perform no rounding like you visually see in the outputted/displayed values of the study. This is well documented here:
Study/Chart Alerts And Scanning: The Effect of the Value Format on Identifier Values

You can control the limit order prices through these cells:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetSystemsAlertsAndAutomatedTrading.php#LimitPrices
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: 2017-03-23 23:19:03
[2017-03-23 23:29:24]
tunah - Posts: 16
Ok, the logic on post number 4 works, =B3 +/- x(currency equivalent of ticks), But is there any way to work with tick values or would I have to code that in a custom study?
Date Time Of Last Edit: 2017-03-23 23:29:58
[2017-03-24 00:09:53]
tunah - Posts: 16
There definitely is no bug. You just need to understand that the CROSS functions use the actual values and perform no rounding like you visually see in the outputted/displayed values of the study. This is well documented here:
Study/Chart Alerts And Scanning: The Effect of the Value Format on Identifier Values

The CROSS function still wouldn't work so I had to use the formula bellow

=AND(ID3.SG1[-1] < -0.099 , ID3.SG1[0] > -0.099 ), and I'm using -.099 since -.1 wouldn't work. I'm still making it work for me but if you happen to have the time at some point, you might want to take a second to look at it, the said formula with the Linear Regression Slope study. Could the fact that I'm using SC on Mac have anything to do with this behaviour?

The CROSS function works fine with positive values and LR regression.



Yes, that's what I referenced to arrive at this logic: =B3 +/- x(currency equivalent of ticks) and it works fine, my question was wether one could use something like "2 ticks" in a spreadsheet instead of say .50 for the /ES for example. I imagine one could coding a custom advance study?

Thanks for your help!
[2017-03-24 00:33:04]
Sierra Chart Engineering - Posts: 104368
We are not understanding what you are saying in post #8. It is not related to post #4 above.

We also do not know what is meant by "tick values".
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
[2017-03-24 01:16:40]
tunah - Posts: 16
Sorry I meant to reference post #6

In post #8 I meant, set the limit price by referencing the Open Price(column B3) and offsetting it by adding or subtracting the desired amount.

For example going long on the /ES and setting the limit price two ticks bellow the open price the formula would be

=B3 - .50

By tick value I mean rather than .50(actual price value) use a value of 2( for /ES example), just as you would on the Trade Window and the DOM when offsetting targets, trails, stops, chase offsets, or the Draw Style Percentage/Tick Offset parameter in the Color Bar Based on Alert Condition Study.

But I think this answers my question:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetSystemsAlertsAndAutomatedTrading.php#AttachedOrderTargetOffset

In particular this bit, which is probably the case throughout when using spreadsheets:
"The Offset is relative to the parent order price. This Offset needs to be specified as an actual price value."

I literally just started using SC, which coming from using Thinkorswim, I think Sierra Chart is fantastic. Anyways, given that using tick values seems not possible on spreadsheets, I was just wondering if you could with ACSIL?

in TOS there's a function called tickvalue() for instance, I figure ACSIL must have something similar. I'm actually trying to find an ACSIL function reference right now.

Thanks
[2017-03-24 01:21:24]
tunah - Posts: 16
I think I may have found what I was looking for:

sc.TicksToPriceValue()



Edit - Seems this is closer to it: sc.TickSize. But is not on the reference page.
Date Time Of Last Edit: 2017-03-24 01:26:28
[2017-03-24 01:36:15]
tunah - Posts: 16
Voila!

http://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scTickSize
[2017-03-24 02:16:29]
Sierra Chart Engineering - Posts: 104368
For spreadsheets what you want to use is:
https://www.sierrachart.com/index.php?page=doc/SpreadsheetSystemsAlertsAndAutomatedTrading.php#CellJ21
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
[2017-03-24 02:38:28]
tunah - Posts: 16
Geez! I can't believe I missed this:

You can use the Tick Size in cell J21 to use in these Limit or Stop Price cell formulas to specify a certain number of ticks as an actual price value. For example = E3 + 4 * J21

That's exactly what I was talking about!

Thanks!
[2017-03-24 03:15:42]
Sierra Chart Engineering - Posts: 104368
That particular sentence was just added today.

Our documentation is updated every day based upon support we do here.
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
[2017-03-24 03:26:05]
tunah - Posts: 16
Ha! That's awesome :)

Thank you guys!

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

Login

Login Page - Create Account