My FX strategy - PipMachine. - page 3

 

Hi there Mook.

Are you referring to the post I made about 30minutes ago stating it wasn't 100% perfect and needs tweaking? If so, I mentioned what you ask in that thread.

As to your other question, nah, I haven't made any performance reports. mainly because I didn't think it was necessary.

 
de04:
Hi FXGuy2000 I just try your system n make some pips for me. Thanks for your great system.

you're most welcome. I hope it really works out well for you.

I trust you are testing on a demo account first? If not, please do, and at least for 3-6months to get to know all the different patterns that emerge.

best of luck.

 
Maji:
Please try attached EA and let me know if it follows the rules of the system. Maji

I tried to adjust the lots and risk size, and got this error.

Compiling 'MA CrossOver with Filters.mq4'...

Function "BreakEvens" is not referenced and will be removed from exp-file

Function "TrailingAlls" is not referenced and will be removed from exp-file

0 error(s), 2 warning(s)

 
Maji:
Please try attached EA and let me know if it follows the rules of the system. Maji

WOW, you've definitely got a talent there Maji, for first try, WELL DONE.

I tried it on the strategy tester and got some Niiiiiiiice results.

However, no not a but. but a however... It needs to be tweaked.

There are some instances in this EA that it acts off that it shouldn't.

I'm going to create an image for you to decribe what I mean.

I hope this picture helps explain it. I've tried to simplify this for automation purposes since it's working without human interaction, so I'm trying to minimize any inconsistances that can normally be advoided if done manually.

Any way, I hope this helps...

Nice work.

Files:
 

FXGuy,

Please give me the complete rules. However, for programming purposes, rules like don't buy when the price is within a channel won't work. The rules need to be mathematically defined. If you can mathematically define a channel, I can try to convert it to computer code.

Also, on your chart, one place you say that it bought too late, in yellow (on the left). It was really selling a position that it had bought earlier. In fact, I think the entry was a few bars before you marked on the chart for entry, when the program detected the entry conditions were met. As usual, I am just trying to implement rules, so the more precisely the rules can be defined, the easier it will be

Thanks for sharing,

Maji

 
Maji:
FXGuy, Please give me the complete rules. However, for programming purposes, rules like don't buy when the price is within a channel won't work.

heehee....yes, I know this... I thought that you maybe able to tell which is classed as a channel...

hang a tick, let me look at the channel again and see what the figure range was.... .... .... ... I would say when ADX, +DI and -DI are in the 0-20 range. However, I think it would be good if the variable can be changed so it can be configured by the user, and the ranges for Macd and to change EMA's too.

Ok, lets see if this is ok...

ADX rules:

========

Condition not to act on ADX:

---------------------------

So, if (ADX) && (+DI) && (-DI) are in range of 0-20, do not enter long, or short.

Condition to BUY:

-----------------

IF, (ADX) && (+DI) or (ADX) && (-DI) or (ADX) && (+DI) && (-DI) are in the range of 25+ start purchase trade trigger based on, IF this condition is true: ADX = 25+ && (+DI) > (-DI) or equal to or more than (==>) = BUY

Condition to SELL:

-----------------

IF, (ADX) && (+DI) or (ADX) && (-DI) or (ADX) && (+DI) && (-DI) are in the range of 25+ start purchase trade trigger based on, IF this condition is true: ADX = 25+ && (-DI) > (+DI) or Equal to or more than (==>) = SELL

Condition to CLOSE Long, or Short:

---------------------------------

IF ADX of its highest last count, decreases by more than 10. CLOSE Long or Short. ie, in diagram above where the purple line is, the ADX green solid line hits 59, being its last known high ADX count, if this figure drops by 10 or more, CLOSE long or short.

====================================

Rules for EMA.

===========

Buy Condition:

--------------

IF ADX BUY condition is true, then:

IF EMAFast is > EMASlow BUY/Go Long.

Sell Condition:

-------------

IF ADX SELL condition is true, then:

IF EMAFast is < EMASlow, SELL/Go Short

Close Condition:

---------------

If "ANY" condition together is true, then:

Close Long = IF EMAFast is < EMASlow ONLY IF

ADX < by 10 or more from its highest last known condition. OR Macd = -0.00

Close Short = IF EMAFast is > EMASlow ONLY IF

ADX < by 10 or more from its highest last known condition. OR Macd = 0.00+

Macd Buy Condition:

============

BUY Trade IF one or both or all conditions are true.

If Macd signal line is at 0.00+ while the condition of EMAFast is > EMASlow and or IF (ADX BUY Condition is true), go LONG/BUY

Macd Sell condition:

-------------------

SELL Trade IF one or both or all conditions are true.

If Macd signal line is at -0.00 while the condition of EMAFast is < EMASlow and or IF (ADX SELL Condition is true), go SHORT/SELL

Macd Close Condition:

--------------------

Close Short Trade IF any condition is true:

IF macd is +0.00 WHILE EMAFast is > EMASlow and OR ADX && +DI && -DI is in the range of 0 - 20. CLOSE TRADE.

Close Long Trade if any condition is true:

IF macd is -0.00, WHILE, EMAFast is < EMASlow and or ADX && +DI && -DI is in the range of 0 - 20. CLOSE TRADE

Maji:
The rules need to be mathematically defined. If you can mathematically define a channel, I can try to convert it to computer code.

I hope above helped... took a while to work it out how to type it up..lol

I hope you can understand it?

Maji:

Also, on your chart, one place you say that it bought too late, in yellow (on the left). It was really selling a position that it had bought earlier. In fact, I think the entry was a few bars before you marked on the chart for entry, when the program detected the entry conditions were met. As usual, I am just trying to implement rules, so the more precisely the rules can be defined, the easier it will be

Thanks for sharing,

Maji

I see, well, I was really impressed at how you managed to capture most of it. Nice work.

 

Thank you FXguy, but I got more confused.

I was expecting rules like this:

if condition1 and condition2 and (not condition3) etc.. .then buy.

By breaking those up, you have got my brains all scrambled, not that is too difficult to do

By the way, the best buys or sells come from low values of ADX, see the charts and you will see. I think too many filters will spoil the system, just like too many cooks will spoil the soup. If the basic system is robust, then why tinker with it. Try as you may, you will have losses. Why worry about them? I, for one, cannot handle too many filters, and any system with more than 3 or 4 rules gets out of my short attention span.

Thanks again,

Maji

 

Hi,

Sorry about that.

The system is designed to only catch the large moves, and not the small ones.

So I'm not sure if you can manage that based on when ADX = 25, etc.

 

Or how's this for a WorkAround4: It's even simplier than all the others.

LONG.

IF ADX & +DI > 20 == LONG

IF LONG and (+DI < 20) CLOSE the LONG Trade.

SHORT.

IF ADX & -DI > 20 == SHORT

IF SHORT and (-DI < 20) CLOSE the SHORT Trade.

OR

WorkAround5:

LONG:

IF +DI & -DI are equal (crossed over) wait for (+DI & ADX) > 20

IF LONG and (+DI < 20) CLOSE the LONG Trade.

SHORT

IF (+DI & -DI) are equal (crossed over) wait for (-DI & ADX) > 20

IF SHORT and (-DI < 20) CLOSE the SHORT Trade.

 

I've been thinking to see if there's a way to simplify things...Here's a few things that may help.

In a nut shell, ADX needs to be above 20 and rising to confirm the current trend is strong (irrespective of whether the price is rising or falling), +DI and -DI need to have crossed and whichever is relevant to the trend direction (+DI = uptrend, -DI + downtrend) must be rising and above 20 themselves.

WorkAround1:

LONG

====

If the condition where +DI & -DI have crossed, check when condition of ADX & +DI is 20 or more. If it is, BUY. (ADX & +DI may not be at 20 when +DI & -DI have crossed, but wait for condition before buying)

SELL

====

If the condition where +DI & -DI have crossed, check when condition of ADX & -DI is 20 or more. If it is, SELL. (ADX & -DI may not be at 20 when +DI & -DI have crossed, but wait for condition before selling)

CLOSE Long:

=========

To close a LONG position, check to see if EMAFast is > than EMASlow.

CLOSE Short:

==========

To close a SHORT position, check to see if EMAFast is < than EMASlow.

---------------------------------

Here's another way to look at it.

WorkAround2:

LONG:

=====

If the condition where +DI & -DI have crossed, check when condition of ADX & +DI is 20 or more & if currency pair price is above EMA1(EMAFast). If it is, BUY.

SHORT:

======

If the condition where +DI & -DI have crossed, check when condition of ADX & -DI is 20 or more & if currency pair price is below EMA1(EMAFast). If it is, SELL.

CLOSE Long:

=========

To close a LONG position, check to see if EMAFast is > than EMASlow.

CLOSE Short:

==========

To close a SHORT position, check to see if EMAFast is < than EMASlow.

OR

WorkAround3:

This one just uses the ADX and nothing else. It's a S-A-R. (Stop And Reverse). Similar to WorkAround1, but it uses the opposite signals to close and repopen the other way.

LONG

====

If the condition where +DI & -DI have crossed, check when condition of ADX & +DI is 20 or more. If it is, BUY.

SELL

====

If the condition where +DI & -DI have crossed, check when condition of ADX & -DI is 20 or more. If it is, SELL.

Close Long:

=========

If the condition where +DI & -DI have crossed, check when condition of ADX & -DI is 20 or more. Close Long.

Close Sell:

========

If the condition where +DI & -DI have crossed, check when condition of ADX & +DI is 20 or more. Close Short.

============

I'm not sure if this confuses things even more. This is as simpliest as I can narrow it down.