Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Using Dow Theory indicator as a filter in automated strategies
I have been trialling the Dow Theory indicator in some of my automated strategies and find that it could be a useful additional filter for entries and more importantly, for early exits.
However as always my programming skills let me down to see how I can use this as a filter in a strategy code.
If anyone can suggest a snippet I would appreciate their assistance.
Cheers,
Nano
Can you help answer these questions from other members on NexusFi?
There are no exposed outputs the way it is currently writtern. So, you can't call this indicator from a strategy. However, it can be modified to allow outputs if I know what you want to use in a strategy. Also, if you want, contact me privately and we can work on it offline.
I made a modification to the DowTheory indicator that plots the high/low lines as continuous so you can see what they were in the past.
Also, I am thinking you want this indicator to report bullish, bearish, or chop so you can test for the current condition in your strategy. So, I modified the code so you can do just that. I am attaching it here so you can review it before I post it in the downloads section.
Insert the following code in your strategy to test for the different market conditions.
I made a modification to the DowTheory indicator that plots the high/low lines as continuous so you can see what they were in the past.
Also, I am thinking you want this indicator to report bullish, bearish, or chop so you can test for the current condition in your strategy. So, I modified the code so you can do just that. I am attaching it here so you can review it before I post it in the downloads section.
Insert the following code in your strategy to test for the different market conditions.
if (DowTheory_v1(10).Direction[0] == 1) // test for a bullish condition
{
// do something related to a bullish market
}
if (DowTheory_v1(10).Direction[0] == -1) // test for a bearish condition
{
// do something related to a bearish market
}
if (DowTheory_v1(10).Direction[0] == 0) // test for a choppy condition
{
// do something related to a choppy market
}
Your version of the Dow Theory indicator looks great Mike. I think you should post it in the downloads section.
I made a modification to the DowTheory indicator that plots the high/low lines as continuous so you can see what they were in the past.
Also, I am thinking you want this indicator to report bullish, bearish, or chop so you can test for the current condition in your strategy. So, I modified the code so you can do just that. I am attaching it here so you can review it before I post it in the downloads section.
Insert the following code in your strategy to test for the different market conditions.
if (DowTheory_v1(10).Direction[0] == 1) // test for a bullish condition
{
// do something related to a bullish market
}
if (DowTheory_v1(10).Direction[0] == -1) // test for a bearish condition
{
// do something related to a bearish market
}
if (DowTheory_v1(10).Direction[0] == 0) // test for a choppy condition
{
// do something related to a choppy market
}
I haven't looked at the indicator yet, but it is great to have guys like you on this forum.
I am slowly learning to program, and I can say the only reason I have been successful in doing so is because of examples of code from yourself and others.
Updated the indicator with line colors so it would be possible to see what the trend was in the past. I also gave the trend text better visibility in the top right hand corner.
FYI - I dabble in coding so there may be a more efficient way to write the code than I did. Feel free to update.
Robert
nosce te ipsum
You make your own opportunities in life.
Elite Membership required to download: Dow_Theory_V2_03_28_15.zip