Candle Crosses VWAP – Uptrending


Category:
0
0

Hi Pete, I’m trying to find a code to capture a single green candle that opens below VWAP and closes above VWAP. And for the VWAP to be uptrending 1-bar ago.

 

Thanks

RESOLVED
Marked as spam
Posted by (Questions: 7, Answers: 16)
Asked on December 17, 2018 11:15 am
225 views
0
Private answer

Here is the code. Screenshot below shows the result.

def data = reference VWAP()."VWAP";
def upTrend = data > data[1];
def condition = open < data and close > data;
plot signal = upTrend and condition;
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal.SetDefaultColor(Color.CYAN);
signal.SetLineWeight(3);

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on December 18, 2018 7:46 am
0

Thanks again as always Pete for your great work and help! Happy holidays!

( at December 18, 2018 8:39 am)