Mimic Halt Indicator

JJTrades

New member
Hey all. I asked this on reddit but I wanted to get more eyes on it just to see if its doable.

For starters, Im not a coder (played with php when I was younger but not well versed at all). So I know the sytax is wrong but I think the coders here will get the jist of what Im trying to achieve.

I want to create a watchlist that has only a single custom script in it, and it would be trying to interpret a halt situation. Example.


if(currentVol-3 > 5mil && currentVol-2 == 0 && currentVol-1 == 0){
halted = true;
}

Trying to see if it would read that the stock WAS trading high, but then all of the sudden within 2 one minute candles went to zero volume indicating a likely halted situation. I was told on reddit that its not possible to set an alert such as:

Alert "$ticker may be halted!";

Where it would dynamically insert the ticker that is triggering the conditions. Any help would be appreciated.
 
Last edited:

JJTrades

New member
it is worth to investigate. Can you post a chart as a sample where the halt would be detected?

The halt would be detected by all three conditions being true. currentVolume-3 is greater than 5 million, currentVolume-2 = 0 and currentVolume-1 = 0. I assume that if this code was plugged into a 1 minute candle screener, and also assuming the code would interpret the halted candles as zero volume, that this would have no problem detecting a halt whether up or down based merely off volume
 

JJTrades

New member
The only downside to this code would be at minute 4, the conditions wouldnt be true anymore because currentVol - 3 would now be equal to zero. So youd really have to be watching the watchlist like a hawk. Thats why initially I wanted to implement a dynamic alert message but, if that isnt possible in ToS then it isnt possible
 

barbaros

Administrator
Staff member
This is pretty simple to code. Let us test with a stock that has been halted and we'll move this conversation to the indicators category if it proves itself doable.
 
Top