![]() If monitor max_length then monitor = max_length If close = highest(close,basic_length) or If stochastic is >=50 then count as uptrend ( psuedo You use the stochastic oscillator with above 50 being uptrend andīe caught by saying this. EG above assumes that if the trend is not 1Īnother method to assign the trend is up or down and replace the code with your Period moving average and the 12 period moving average on the chart you can Uptrend =1 downtrend =-1 and the initial value is assigned as 0. Then begin binary_trend=1 end else binary_trend =-1 ĭecides the "binary trend" which means it converts it to a number. If average(close,fast_length) > average(close,slow_length) Is for making a plot that goes into sub graph 2 and does not overlay over the Up to make your own blended average combination. The slow one into a weighted average or an exponential average and mixing these Slow and fast variables you will see they both use averages (average is this ![]() ( The code for value1ĭoes this after reading the factor input ) ![]() Value1 or value2 or value 99 as variables, then you do not need to declare theĪ very neat way to get 2 variables to automatically assign 1% of one part andĩ9% of the other part so when added they will always = 100%īy restricting inputs by making the variables read them. With values like 0.1 and 0.9 to see the affects of adjustments to the weighting. ![]() Of the slow average set factor to 1, to see the plot constructed entirely of the Will make some simple to understand examples so you can learn what each partĪbove code first before creating this indicator and see if you can see what itĪverages used with slow length of 50 and a fast length of 20, the input calledįactor is adjustable to assign a weighting to each one.Ġ.5 it will add 50% of the slow average to 50% of the fast average and create a Put fear into those who are trying to learn it. How to make indicators, functions, signals and strategies in Tradestaion ![]()
0 Comments
Leave a Reply. |