Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 02:43:01 +0000



[Programming Help] - Writing Code

View Count: 2454

[2017-11-30 13:00:04]
User990040 - Posts: 6
I wrote some simple code. It's two parts.

Part 1 goes on my MACD: AND(CROSSFROMABOVE(ID3.SG3,0)) This works perfect.

Part 2 goes on my second indicator: AND(CROSSFROMABOVE(ID2.SG1,0)) This works perfect.

When I combine them it only works some of the time: I wrote the code two different ways.

Example 1: AND(CROSSFROMABOVE(ID3.SG3,0),CROSSFROMABOVE(ID2.SG1,0))

Example 2:AND(CROSSFROMABOVE(ID3.3,0),ID2.SG1<ID2.SG2)

What am I doing wrong? Thanks
Date Time Of Last Edit: 2017-12-16 00:48:35
[2017-12-15 23:26:25]
Sierra Chart Engineering - Posts: 104368
We saw your email. Did you still need help with the above?

We see this post is marked as hidden.
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-12-15 23:40:09]
User990040 - Posts: 6
After no response, I took it down...I guess it's called hidden. Anyway, Yes this is the post. Thank You
[2017-12-16 18:45:08]
Sierra Chart Engineering - Posts: 104368
What is the symbol of the chart?

Describe the studies you want to use and what condition you want to detect with them.
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-12-18 01:37:02]
User990040 - Posts: 6
http://www.sierrachart.com/image.php?Image=1513560101525.png

I have written two codes, one for shorts and one for longs.

AND(CROSSFROMABOVE(ID2.SG3,0),ID3.SG1<ID3.SG2)

AND(CROSSFROMBELOW(ID2.SG3,0),ID3.SG1>ID3.SG2)

The Chart you are viewing is a "NQ" 7 Rangebar chart with a MACD indicator and a CCI indicator. As you can see sometimes I get an orange background color when it indicates a short setup and sometimes a green background color when it indicates to go long. Everywhere you see an arrow is where it should be indicating a long set up or a short setup. Those arrow are pointing out the first time they are both above or below the zero line on the two indicators.

I want to know the first time they are both in confluence. I want the color background to trigger as the moment unfolds. Like a warning signal. Then once it meets the criteria then as you can see it should just stay highlighted. I only need that bar to be highlighted.

I hope this makes sense. I appreciate the help or direct me to a person who you think can make it happen. Gregg
Date Time Of Last Edit: 2017-12-18 02:21:07
[2017-12-18 21:24:20]
Sierra Chart Engineering - Posts: 104368
OK this is is not very simple.

Our help is available at 50 USD per hour. We do not even know how long this would take and in the end, it may not even be practical to accomplish what you want.

So you could end up spending 50 USD with us and in the end not accomplishing what you want. This is why we will not get involved.

You may want to contact:
http://www.sawtoothtrade.com/

Also, if you cannot figure this out you have to ask yourself whether anyone else could as well.
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-12-19 17:51:52
[2017-12-18 22:55:59]
Sawtooth - Posts: 3976
Try this:
Longs:
OR(AND(CROSSFROMBELOW(ID3.SG3,0),ID2.SG1>0),AND(CROSSFROMBELOW(ID2.SG1,0),ID3.SG3>0))
Shorts:
OR(AND(CROSSFROMABOVE(ID3.SG3,0),ID2.SG1<0),AND(CROSSFROMABOVE(ID2.SG1,0),ID3.SG3<0))
where the MACD is ID3 and the CCI is ID2.
[2017-12-19 19:03:17]
User990040 - Posts: 6
Thank you everyone for your help.
[2017-12-19 19:23:53]
Sierra Chart Engineering - Posts: 104368
Let us know if the formulas in post #7 worked for you. If so, that is good.

After a quick review, we just saw this as not simple and did not want to get involved and just left it at that. But if there was an easy solution, that is good as well.
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-12-19 19:25:27

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

Login

Login Page - Create Account