MA Cross with TF agreement based MM

Place your new trading idea here to see if someone can automate it.
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

I have been doing a lot of full-immersion style reading on trading, traders, MM, FOREX, strategy development etc, lately. I go through phases. :)

I came across this article and thought it had many parallels to this "Miller Cross" strategy. Some very interesting tidbits -- any emphasis, mine.

Read the whole (short, non-scholarly) article for the full gist.

It is from the blog of Dr Ernest Chan, author of Quantitative Trading
You can find an interview of me in the July 2009 issue of Technical Analysis of Stocks & Commodities magazine. I mentioned in that interview and also in my book that I believe stop loss should only be applied to momentum strategies but not to mean-reverting strategies. I explained my reasoning better in my book than in the interview, and so I will paraphrase the explanation here.

In algorithmic trading, it is reasonable and intuitive that we should always make use of the latest information in determining whether we should enter into a position, whether that information is price, news, or some analysis. Let's call this the Principle of Latest Information. (If someone can think of a better or sexier name, let me know!) ...
See link for full context and description of his point. But he ends with:
(Now, if we hold this losing long position long enough, the model will incorporate new historical prices into determining its long or short signals as it retrain itself, as the Principle of Latest Information says it should! At that time, it may indeed recommend that we exit the previously held long position at a loss. But this adjustment takes place at a much longer time scale, and therefore cannot really be considered a stop-loss in its usual sense.)

More generally, I find that at every turn, and not only in the realm of stock trading, applying the Principle of Latest Information always help me to be disciplined and not be afraid to enter into new positions, take loss or endure a drawdown as the case may be.
http://epchan.blogspot.com/2009/06/my-i ... le-of.html

Cheers,

Rick
"A problem well put is half solved."
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

Khalaad wrote:
Khalaad wrote: The first thing to do here is to define risk. My experience is (also) that moving average crosses and stops do not go together very well. Hence I would define risk as average loss for individual pairs you wish to trade measured through back tests over a sufficiently large sample of trades. Therefore, you shall need a functional EA before being able to incorporate appropriate money management. In my opinion there are no short cuts; money management being far too important. Khalid
I wish to expand further on the matter of stops and a moving average cross strategy. If the strategy is an alwats-in reversal method, then I would not use a Stop. Otherwise, I will; specially if Take Profit is employed.

Khalid

So. Depending on how many TFs you use to compare, this is an "always in reversal system" where we do not use stops because it is always in.

However it could also be a NOT always in system -- BUT it uses signals ("votes" from the TFs) as to when to get out/take profit rather than actual stops.

As discussed earlier, I think I would have emergency and/or equity based stops employed, but not the typical SL, TP stops.

What are your thoughts? So long as position size is correct (however you and I might define that), do you see any problem with what I have suggested?

Sorry for my delay in this thread. I have been trying to learn MQL so I can adjust George's MillerScore indi to do more along the lines of what I need (as awesome as it is by itself!) Specifically to have all the custom settings for each TF -- from post 1 description:

On the number of TFs to compare:

I would like the option of comparing up to 7 TFs (default is 2 or 3). This will still allow the default setups but let us test the effects of using more TF agreements.

Each of the 7 TFs should have the following options:

TF 1(etc): Any of Empty4’s default TFs
MA Type: Default is SMA, but could be any of AllAverages MA options
MA Fast Period: Default is 10
MA Slow Period: Default is 30
Eventually, even if we don't get the full EA, I would like to add simulated order taking to the indi so we can see wins and losses of successive trading groups.

I have been a little disappointed that there didn't seem to be more interest in this strategy... Especially since it is a strategy that a large number of people have been trading successfully. That's what I get for posting around the New Year and all of it's craziness. :lol: [end /whining]

So I am trying to take up the mantle myself and keep the torch lit. How is that for mixing my metaphors!? :)

I would still love any help anyone has to offer!

Many Pips!

Rick
"A problem well put is half solved."
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: MA Cross with TF agreement based MM

Post by gaheitman »

ironrick wrote:On the number of TFs to compare:

I would like the option of comparing up to 7 TFs (default is 2 or 3). This will still allow the default setups but let us test the effects of using more TF agreements.

Each of the 7 TFs should have the following options:

TF 1(etc): Any of Empty4’s default TFs
MA Type: Default is SMA, but could be any of AllAverages MA options
MA Fast Period: Default is 10
MA Slow Period: Default is 30

I would still love any help anyone has to offer!

Many Pips!

Rick
The attached allows you to specify the fast and slow periods and use any of the built in options for MAs for each timeframe. The settings for each time period have to be entered as shown, without spaces and in all caps. Valid entries for the mode are SMA, EMA, SMMA, and LWMA.

George
You do not have the required permissions to view the files attached to this post.
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

gaheitman wrote:
The attached allows you to specify the fast and slow periods and use any of the built in options for MAs for each timeframe. The settings for each time period have to be entered as shown, without spaces and in all caps. Valid entries for the mode are SMA, EMA, SMMA, and LWMA.

George
Oh wow! Awesome! Testing this now! Many and true thanks, George!!

Now I feel bad for "whining"! [begin/ twingeofguilt] :oops: :lol: :lol:

I will get back to everyone on what I discover. (And after pouring over the code for the first indi, looking forward to see how you changed this one!)

Cheers,
Rick
"A problem well put is half solved."
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: MA Cross with TF agreement based MM

Post by gaheitman »

ironrick wrote:
I will get back to everyone on what I discover. (And after pouring over the code for the first indi, looking forward to see how you changed this one!)

Cheers,
Rick
Don't expect too much brilliance, I was racing to get it done. The word kluge comes to mind. For those of you who haven't heard that particular term before:
Dictionary.com wrote: kludge   [klooj]
noun Computer Slang .
a software or hardware configuration that, while inelegant, inefficient, clumsy, or patched together, succeeds in solving a specific problem or performing a particular task.
I looked at adding the AllAverages calls in the same manner, I don't think it will be too difficult. I think it might be dreadfully slow depending on your choices, however.

If you notice in the code, I added a UseRSI flag, that switches from using MA crosses to Mutli-TF RSI signals. It's not too shabby either. Then I started thinking about making the indicator the swiss army knife of trend indicators allowing you to pick any darned thing you wanted for any darned time frame. Then something shiny happened by and I wondered off after it.... :lol:

George
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

gaheitman wrote: I looked at adding the AllAverages calls in the same manner, I don't think it will be too difficult. I think it might be dreadfully slow depending on your choices, however.

If you notice in the code, I added a UseRSI flag, that switches from using MA crosses to Mutli-TF RSI signals. It's not too shabby either. Then I started thinking about making the indicator the swiss army knife of trend indicators allowing you to pick any darned thing you wanted for any darned time frame. Then something shiny happened by and I wondered off after it.... :lol:

George
What an excellent idea!! You might be on to something! I had been introduced to Hull Moving Average (HMA, which is included in AllAverages, BTW) recently and how the maths work. -- see here: http://www.traderslog.com/hullmovingaverage/

I had been wondering about using it for this system too. The only wrinkle is that it would require slightly different logic because I don't think you would really use 2 HMAs for a cross, you would just use the one HMA with angle detection. (Whatever you call that, my mind is drawing a blank.)

Does anyone else have experience in this? I really like the HMA's very very low lag... But I don't want to over-complicate things either.

Rather than saying she has ADHD, my sister says she has ADOS: "Attention Deficit... Oooh Shiny..." ;)

I know the feeling!

Rick

Edit: BTW, here is a HMA indi I had been playing with. I got it from FF. Just in case...
You do not have the required permissions to view the files attached to this post.
"A problem well put is half solved."
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: MA Cross with TF agreement based MM

Post by gaheitman »

ironrick wrote:Rather than saying she has ADHD, my sister says she has ADOS: "Attention Deficit... Oooh Shiny..." ;)
I like that. :lol:

George
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

George: Sooooo.... I am asking for help again...

I realized this is still not quite what we need. The latest version of the indi only allows the use of each of Empty4's TFs once. I need to be able to specify which TF to use (or use again) on each of the 7 TF settings areas.

The reason: I am trying to test the original strategy of using 4h, 8h, and 1d (24h) timeframes. Which means I have to synthesize the 8 hour by using the 4h TF a second time and using different MA periods.

(I believe using the 4h to synth the 8h when all the slow/fast periods should be equal to 10/30 = 4h with ma slow/fast of 20/60 -- Is that correct? I think it should be close anyway. For a 12h I think it is 30/120?)

I have been reading for days about MQL but I just can't quite follow all the array logic yet... :?

I understand the POINT of what is being done most of the time but not exactly HOW yet for me to change it myself.

Is it a big deal to update the indi again? If you don't have time, I will press on with my studies with a view to "get there". (I will continue with my MQL learning in any case, of course.)

Would now be a good time to include the AllAverages/swiss army stuff? (This is a bonus -- not required at this time.)

I have been excited as heck to get my hands on the codersguru stuff! I THINK I am making progress! :ugeek:

Cheers,
Rick
"A problem well put is half solved."
User avatar
ironrick
Trader
Posts: 85
Joined: Wed Nov 16, 2011 7:04 pm
Location: North Idaho Boy, USA

Re: MA Cross with TF agreement based MM

Post by ironrick »

BTW, if we were to use an RSI type setting as you suggested, how would you handle the "voting" -- ie what did you have in mind? When overbought vote=sell? When oversold vote=buy?

Should we include as options the levels at where we would consider OB/OS? 70/30 is the common default I think...

Just wondering out loud...

I just realized I could put both use styles of the indi on the same chart and see how they do compared to each other. Duh. But Cool! :)

Cheers,
R
"A problem well put is half solved."
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: MA Cross with TF agreement based MM

Post by gaheitman »

ironrick wrote:BTW, if we were to use an RSI type setting as you suggested, how would you handle the "voting" -- ie what did you have in mind? When overbought vote=sell? When oversold vote=buy?

Should we include as options the levels at where we would consider OB/OS? 70/30 is the common default I think...

Just wondering out loud...

I just realized I could put both use styles of the indi on the same chart and see how they do compared to each other. Duh. But Cool! :)

Cheers,
R
I just did above/below 50 line.

George
Post Reply

Return to “Ideas for Possible Automation”