Facebook is the 1st/main graph I look at and s&p500 is the second graph I want to refer to.
For example, if FB reaches 20bar high but s&p500 drops in price then sell FB this bar on close.
Code: Select all
condition1=check s&p500
if close > highest(close,20) and condition1 then
sell "Sell Fb" this bar on close;
Also, I would like know how I can compare closing prices based on the indicator value.
I can't use adx[...] since I don't know the exact number of bars before ADX was 20 ( assuming ADX now is at 60).
For example, I want to know whether the price increased or decreased while ADX went from 20 to 60.