If i have an indicator that only paints bars, is it possible to pull that code into a strategy such that I can generate buy/sell signals from it?
I'm trying to automate these two strategies since everyone seems to have good experience (figure why can't this be automated...) adding in some position sizing, unwinding positions faster as risk is built up, etc etc
Trying to start with ADXVMA_sharky indicator... right now it only paints the adx line red/blue/yellow from my understanding...
what I want to implement is when red... sell, when blue... buy, when yellow... do nothing...
(from there on will build on the other indicators)
i've bold faced and underlined the area I believe would set the conditions....
any ideas on how this could be done?
Can you help answer these questions from other members on futures io?
Is part of the conditions for the LONG side of strat I've been testing recently. It looks for a two bar trend confirmation. Not the fastest, but worth considering.
should have updated earlier... figured it out... i'm a doofus!
was very easy to implement just by simply calling the indicator into the strategy...
going to go through the thread again later tonite to see the specific conditions that = true in order to enter a trade for either strategy...
or if someone once to be a champion and post the exact conditions that'll make life much easier.... have much of the money management logic in place...
running a random entry for the money management nets positive edge, so that much does look good (was tested on 12000+ trades)
I have been using the ADXVMA in a strategy too. I added a a MAslope data series to the indicator, made it a public data series. Then the strat just checks the value ( I used a -1 = negative, 0 = flat , 1 = positive slope) of the data series for the bar you are interested in.
When checking that actual "price" value of the plotted line of an indicator I use the simpler version ie non paint. I think it uses less system resources.
In a strategy that has multiple entry conditions I like to create variables in the strategy that I then set at the beginning of the OnBarUpdate based on the relevant indicator states at that bar. Then instead of calling the indicators over and over I just check the variables.
Hi RBSailing , you mention a MASlope which I am looking for to work with the TripleEMA with 2 diiferent length, using the longer one as a filter. How can I get an indicator transformed to have the slope? I would like to have a general script to input in different indies. Have you an idea how to do?
Thanks Wolfsch
Hi RBSailing , you mention a MASlope which I am looking for to work with the TripleEMA with 2 diiferent length, using the longer one as a filter. How can I get an indicator transformed to have the slope? I would like to have a general script to input in different indies. Have you an idea how to do?
Thanks Wolfsch
There is an indicator in the download section ColorSampleUniversalMovingAverage
That should do the job for you. I am not sure the exact algorithm they use. I will look at it and posagain. I modified the slope angle calculation that I think originate at NT forum. That calculation averaged the indicator value of the last 2 bars and then compared it to the current value. I removed the averaging so I just check the slope form the last bar to the current bar.
Have you lookad at the LinReg Ma?
I checked the code in the ColoredMA that I posted a link to in my last post. It colors that Line based on the slope alone. Most of the colored MA's posted in the downlaod section are actually checking the angle of the line. That way you can differentiate between slowly rising and steeply rising, which some feel gives you an idea of the momentum of the trend.
You have to add code in several places to accomplish this. If you are comfortable with coding you can down load one of the colored ma's in the download section and copy the code snippets to your own code.
Good luck
Hi RBSailing, thanks , but the universal MA is just a MA with color depending on slope. I was looking for an indicator which gives the SLOPE of an MA! Do you have an idea where to go?
Regards Wolfsch
The indicators that I have seen that paint the line according to the trend and "slope"
of the line calculate the angle of the line and then filter that by fixed angle values to determine the color of the line.
If you import anyone of those and open it in the editor window you should be able to copy the relevant code.
Let me know if you are having problems or need help.
Thanks RBSailing, but I am unable to do something with a code . I am not a programmer!
So I really need help doing what you said would get the results I am ö
looking for. I would appreciate your help. my mail is wolfgschiller@web.de
I have added the code to calculate the angle of the slope of the indicator to the TEMA in the NT indicators. I have posted the resulting indicator in the download section. Just look for TEMA With Slope.
You can call this indicator in your strategy and get the value of the slope for each bar.
The code would be
TEMASlope(Close,13,false).MASlope[0]
this will return the slope of the line at the current bar. The "13 is the period of the TEMA.
The following user says Thank You to RBSailing for this post: