♥ 0 |
Pete Could I get help with a scan from a lower study…Looking for two conditions in the scan…Green cloud and green dotted line for long sacn….Red cloud and red dotted line for short…
#Look for the Dashed lines to turn color and Avg line to cross the Dash line for an entry but with more risk, next entry when avg line and dashed color line crosses the 40 line. Next and probably the best risk is when the avg line and dashed line cross the zero line and Dashed line and cloud are the same color. I use this with a MACD crossover arrow setting at 5,13,4 or 5,13,6 or 3,13,6 #Not 100% on the ADX vertical line and histogram this might need to be adjusted to match a normal ADX line. The ADX vertical line can be turned off in the edit study. The hisotgram can be hidden as well. #Use with the Upper matching MP_SMIandVerticalLineWarning System here>>> http://tos.mx/mDvxaX #use setting gridsize .10 for/CL for tick charts and lower agg time frames and 1.0 for 1 hour and Daily. declare lower; def percentDLength = 3; def min_low = Lowest(low, percentKLength); def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength); plot SMI1 = if avgdiff != 0 then avgrel / (avgdiff / 2) * smiscale else 0; plot upper = smilimit; plot lower = -smilimit; # Awesome Oscillator plot Zero = 0; #AddCloud(SMI, smilimit, Color.GREEN, Color.LIGHT_GRAY); Alert(audio and SMI crosses above 0, “SMI Long”, Alert.BAR, Sound.Ring); #adx histogram plot ADX = (DMI(length, averageType).ADX) – 18;
Marked as spam
|
Private answer
If you only want the scan based on the SMI you don't need any of this code to do that. You can build this using the condition wizard and reference the built-in study named: "StochasticMomentumIndex" and the plot from that indicator named "SMI". The rules are very simple:
So you build each signal separately and each consists of only two conditions in the Condition Wizard. No custom code required and all you have to do is point and click. This video explains how to build several scans using the condition wizard: https://www.hahn-tech.com/thinkorswim-condition-wizard/ The only reason you would need to use the code you provided instead of the Condition Wizard is if your scan required the use of some other elements in that custom code. Marked as spam
|
Please log in to post questions.