microsat2 Posted August 4, 2015 Report Posted August 4, 2015 A SMAColors indicator has three lines color. If (Rising(SMAColors(14)) PlotColors[0][0] = Color.Blue; else if (Falling(SMAColors(14)) PlotColors[0][0] = Color.Red; else PlotColors[0][0] = Color.Yewllow; My question is "can we use the PlotColors to trigger short or long trade in a strategy?" Like if (SMAColors(14).PlotColors[0][0] == Color.Red) EnterShort();
⭐ JDizzle22 Posted August 4, 2015 Report Posted August 4, 2015 A SMAColors indicator has three lines color. If (Rising(SMAColors(14)) PlotColors[0][0] = Color.Blue; else if (Falling(SMAColors(14)) PlotColors[0][0] = Color.Red; else PlotColors[0][0] = Color.Yewllow; My question is "can we use the PlotColors to trigger short or long trade in a strategy?" Like if (SMAColors(14).PlotColors[0][0] == Color.Red) EnterShort(); Declare a int in the variables section "private int signal = 0;" If (Rising(SMAColors(14)) { PlotColors[0][0] = Color.Blue; signal = 1; } else if (Falling(SMAColors(14)) { PlotColors[0][0] = Color.Red; signal = 2; } else { PlotColors[0][0] = Color.Yewllow; signal = 0; } if (signal == 2) EnterShort(); exp48967 and microsat2 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now