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(); Quote
⭐ 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.