Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 04:00:15 +0000



[User Discussion] - Buy Exit Code help

View Count: 3501

[2014-03-23 18:07:41]
Litz - Posts: 131
This is incorrect something out of place.

=OR(AND(CROSSFROMABOVE(AE3:AE5,AG3:AG5);AND(AA3<AB3,AA4>AB4))

trying to exit either cross 80 stochastics from above where AE is %K and AG is 80 line
or Moving average cross down where AA and AB are moving averages

http://www.sierrachart.com/image.php?l=1395598178297.png

Friday ES chart

Date Time Of Last Edit: 2014-03-23 18:10:50
[2014-03-23 19:53:09]
Sierra Chart Engineering - Posts: 104368
This should be written as:
=OR(CROSSFROMABOVE(AE3:AE5,AG3:AG5), AND(AA3<AB3,AA4>AB4))
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: 2014-03-24 06:32:30
[2014-03-23 20:46:59]
Litz - Posts: 131
I still get invalid formula message with that
[2014-03-24 01:25:24]
Sawtooth - Posts: 4120
Try this:

=OR(CROSSFROMABOVE(AE3:AE5,AG3:AG5) , AND(AA3<AB3,AA4>AB4))
[2014-03-24 06:34:27]
Sierra Chart Engineering - Posts: 104368
Yes, the formula given in post #4 is correct. We did not correctly edit the formula completely in our original post. It has now been corrected.
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
[2014-03-28 23:57:38]
Litz - Posts: 131
Is this the correct format for entry when both conditions exist where %K AE crosses 25 AH line from below and fast moving average AA crosses up over longer moving average AB:

=AND(CROSSFROMBELOW(AE3:AE5,AH3:AH5) , AND(AA3>AB3,AA4<AB4)) does not generate trade

chart represents OR condition http://www.sierrachart.com/image.php?l=1396050558477.png

=OR(CROSSFROMBELOW(AE3:AE5,AH3:AH5) , AND(AA3>AB3,AA4<AB4)) works

Date Time Of Last Edit: 2014-03-29 00:03:34
[2014-03-29 00:28:58]
Sawtooth - Posts: 4120

=AND(CROSSFROMBELOW(AE3:AE5,AH3:AH5),AA3>AB3,AA4<AB4)
This formula says both crossovers must happen in the same bar to be TRUE. This would be rare.

=OR(CROSSFROMBELOW(AE3:AE5,AH3:AH5),AND(AA3>AB3,AA4<AB4))
This formula says either crossover can trigger a TRUE. This is what the pic shows.

Maybe you want something like this:
OR(AND(CROSSFROMBELOW(AE3:AE5,AH3:AH5),AA3>AB3),AND(AE3>AH5,AA3>AB3,AA4<AB4))
This formula is TRUE when:
AE3 crosses AH5 from below and AA3 is already above AB3,
OR
AE3 is already above AH5 and AA3 crosses AB3 from below.
[2014-03-29 01:19:11]
Litz - Posts: 131
OK Tom thanks that works better
[2014-03-30 21:31:27]
Litz - Posts: 131
tomglib , this is what I came up with to solve the problem of preventing buys while longer term MA is still going down:
=OR(AND(CROSSFROMBELOW(AE3:AE5,AH3:AH5 ), AE3>AH5,AB3>AB5) , AND(AE3>AH5,AA3>AB3,AA4<AB4)) K
=OR(AND(CROSSFROMABOVE(AE3:AE5,AG3:AG5),AA3<AB3),AND(AE3<AG5,AA3<AB3,AA4>AB4)) M

seems ok with input and range bar tweaks

Now looking to include Stochastic divergence above 80 or below 20 to improve entries Divergence is a good reversal sign

http://www.tradeforextrading.com/index.php/stochastic/stochastic-divergence-trading

IE if %K decreases after crossing above 80 while price increases, sell if short term ma reverses
from friday ES example of divergence http://www.sierrachart.com/image.php?l=1396215671106.png

playing with these: if %K decreases after cross above 8o, and price increases, buy when %K crosses 80

=OR(AND(CROSSFROMABOVE(AE3:AE5,AG3:AG5),AA3<AB3),AND(AE3<AG5,AA3<AB3,AA4>AB4) , AND(AE3>AG3,AE3>AE5) , AND (AA3<AA5,AE3<AG3))

conversly If %K increases after crossing below 20 while price decreases, buy when %K crosses above 20

=OR(AND(CROSSFROMABOVE(AE3:AE5,AG3:AG5),AA3<AB3),AND(AE3<AG5,AA3<AB3,AA4>AB4) , AND(AE3<AH3,AE3>AE5) , AND (AA3>AE5,AE3>AH3))

still learning

Date Time Of Last Edit: 2014-03-30 21:41:49

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

Login

Login Page - Create Account