Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 20:33:43 +0000



Post From: How to detect price cross a constant on the same bar

[2015-01-26 23:38:30]
User26860 - Posts: 14
Hi there,

After reading the documentation for quite some time, I am still unable to figure out how to write ACSIL to detect a cross over of price above or below a pre-determined constant level on the SAME bar.
I tried to use sc.Close, but sc.Close[index-1] seems to give me the close price of last bar, not the last tick price as wanted, or am I missing something here?

Thank you in advance!