- Topics: 31
- Replies: 172
- Posts: 203
The best way to build a script is in its component parts as a Show Bar or Show View so you can see they are doing what you expect them to be doing. See this video for more:
This is quite a complex request and beyond the scope of usual support, but here’s what I came up with for the entry. If you want more help with the sell then we can arrange a scripting consultation, starting at $100 an hour.
Apply this to a Show Bar and let us know how you go:
// is it a new 40 day high
v1 = HIGH() > HIGHESTHIGH(BARS=40);
//was the high 4 days ago?
v2 = TIMESINCESIGNAL(v1) == 4;
//are previous lows lower?
v3 = LOW(OFFSET=1) < LOW(OFFSET=2) and LOW(OFFSET=2) < LOW(OFFSET=3) and LOW(OFFSET=3)<LOW(OFFSET=4);
//is current close higher?
v4 = CLOSE() IsUp;
//is close in top 20% of bar?
v5 = CLOSE() > (LOW()+(HIGH() - LOW())*0.8);
//show when conditions are true
v2 and v3 and v4 and v5