Reply To: thestrat

Optuma Forums Optuma Scripting thestrat Reply To: thestrat

#65081
Marc
  • Topics: 10
  • Replies: 22
  • Posts: 32

Hi Darren,

Ok I got how to plot the lines. Thank you very much.

Regarding the formula, it does not really work though

The candle from 2 days ago needs to be a directional candle meaning it closed higher or lower than the candle 3 days ago . So it should be outside bar + inside bar + outside bar (Up) but this does not work:
BARTYPES(DEFAULT=Outside)[2];
and BARTYPES(DEFAULT=Inside)[1];
and BARTYPES(Day(PERIODAMOUNT=1), DEFAULT=Outside);
when I Execute scan: unknown Function: offset Bartypesdefault= Inside1

I have modified the original formula accordingly and it works
v1= HIGH()[2] > HIGH()[3] and LOW()[2] >= LOW()[3];
v2= LOW()[2] < low()[3] and HIGH()[2] <= HIGH()[3];
v1 or v2

However when I add the inside bar and BARTYPES(DEFAULT=Inside)[1]; on the NASDAQ100 results include outside bars such as ADSK, CDW, CHTR, COST, CSX.. etc)… Then if I add the last criteria:  and BARTYPES(Day(PERIODAMOUNT=1), DEFAULT=Outside); I have:  unknown Function: offset Bartypesdefault= Inside1 … so I don’t get the expected result…

Thanks and best regards

Marc

Pin It on Pinterest