Support Board
Date/Time: Sun, 16 Mar 2025 02:57:35 +0000
CrossFromBelow Alert for POC crossing only for previous candle
View Count: 755
[2022-08-07 14:05:00] |
Kai - Posts: 10 |
Hello, im using the "Trading System based on alert condition" and would like to get an alert if the current price crosses the previous candle poc from below like in the attached screen. So if the current price goes below the previous poc at 4142.25 and than crosses this poc from below i would like to get an alert. Here my current formula: =AND(CROSSFROMBELOW(ID11.SG42[-1], ID25.SG1), AVAP(L[-1], -1)=0, AVAP(L, 0)=0) ID25 - CurrentPriceLine-study ID11 - Numbers Bars Calculated Values-study to get the poc AVAP - to detect finished auctions That works quite well, but it seems that the alert also gets triggered on the poc of the third last candle at 4141.75 because this poc seems to be included in the range. That should not happen. I only want an alert for the previous candle poc. How can i achieve this? Regards, Kai |
![]() ![]() Attachment Deleted. |
[2022-08-07 17:58:20] |
Sawtooth - Posts: 4184 |
The CROSSFROMBELOW function must use a range, and when used with Simple Alert syntax, the range is the previous bar to the current bar. So since you are referencing the previous bar in the formula, the CROSSFROMBELOW is seeing the [-2] bar. So try this: =AND(C[-1]<ID11.SG42[-1], C>ID11.SG42[-1], AVAP(L[-1], -1)=0, AVAP(L, 0)=0) |
[2022-08-08 19:08:28] |
Kai - Posts: 10 |
It isnt working. No alert is triggered over whole candle. Also dont understand how this should match my conditions.
|
[2022-08-08 19:21:56] |
Sawtooth - Posts: 4184 |
Also dont understand how this should match my conditions.
The idea is to avoid using CROSSFROMBELOW.There are no intrabar comparisons, so they must be interbar. The suggested formula has the Close crossing from below ID11.SG42[-1] (in the previous bar) to above ID11.SG42 in the current bar. Also, if you want to use CROSSFROMBELOW, it makes a difference which you list first in the formula, IOW list the faster first. |
[2022-08-08 19:40:59] |
Kai - Posts: 10 |
Will try it over crossfrombelow. Close is too late for me. What do you mean with "IOW list the faster first"? |
[2022-08-08 20:22:59] |
Sawtooth - Posts: 4184 |
What do you mean with "IOW list the faster first"?
=AND(CROSSFROMBELOW(ID25.SG1,ID11.SG42[-1] ), AVAP(L[-1], -1)=0, AVAP(L, 0)=0)
|
To post a message in this thread, you need to log in with your Sierra Chart account: