Moving average cloud?

Namor

Namor

New member
VIP
How about a script consisting of a moving average cloud with the two averages based on the open and the close. Along with alarms which delineate whether long or short?
 
BenTen

BenTen

Administrative
Staff
VIP
@Namor Is this a request for a new indicator to be made or is it related to the Buy the Dip cloud posted above?
 
G

generic

Member
@Namor You need to change the source code to change the cloud colors.

Code:
input show_ma = no;
input length = 10;
input averageType = AverageType.SIMPLE;
def nan = Double.NaN;

def open_ma = MovingAverage(averageType, open, length);
def close_ma = MovingAverage(averageType, close, length);

plot MovAvg_open = if show_ma then MovingAverage(averageType, open, length)
else nan;
plot MovAvg_close = if show_ma then MovingAverage(averageType, close, length) else nan;

AddCloud(close_ma, open_ma, color.GREEN, color.RED);
 
Last edited by a moderator:

Similar threads

Top