stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Rail Road Tracks
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1774
Page 12 of 15
Author:  SteveHopwood [ Tue Apr 16, 2013 10:14 pm ]
Post subject:  Re: Rail Road Tracks

Henric wrote:
RRT.png
Morning Steve,

hope the coffee was good, as the pastries, or is that more with the afternoon tea ??


Attached the results of rtt, ootb, no human touch.
Will setup up last version tomorrow, no time today.

Have a nice , spring, (finally) day, as all the snow is gone now, i hope...

Cheers to all,

H
Looking good Henric. What tf was this?

:D
Author:  SteveHopwood [ Tue Apr 16, 2013 10:16 pm ]
Post subject:  Re: Rail Road Tracks

Freedom787 wrote:
SteveHopwood wrote: Nice result. Congratulations.

:D
Thanks Steve. I'm hoping I can contribute more because I really think there is large potential with this EA. I am testing one version I edited to wait an extra bar for confirmation of pin or RR before entering trade. Its the whole argument of getting in early, or waiting to confirm entry so I'm anxious to see how it goes.
I look forward to seeing your results. I am testing this live an the M15 on my Cowboy IBFX Aussie play account (a play account is the only one to hold with these people, guys) and breaking even, just.

Henric has some good results. We are moving on.

:D
Author:  Henric [ Wed Apr 17, 2013 6:28 am ]
Post subject:  Re: Rail Road Tracks

Looking good Henric. What tf was this?

1 and 4 hrs

Cheers,

H
Author:  Freedom787 [ Wed Apr 17, 2013 2:51 pm ]
Post subject:  Re: Rail Road Tracks

Steve,

Thought of a couple changes last night that i've been playing with. Note sure of its of interest to you but here you go:


* When examining Pin Bars, many "pin bars" are being taken that are not pin bars, so i moved the shift to 1, delaying entry but hopefully getting more consistent entries.

* I added extern double pinbarPercentageOfLength , to examine that the pin bar has an overall length greater than the average candle by this factor ( default is 1, for average candle size). Not sure if it is fruitful yet, but I noticed many good pin bars tend to be significantly longer than a typical candle.

*Analyzed the open and closes instead of the bid since we are looking at a historical candle. Noticed the old code used Bid for both buy and sell pinbars, may want to consider using the Ask price for buy candles.

* Not sure why you use code "close enough", there is code in mql4 http://articles.mql4.com/866 called CompareDoubles(dbl1,dbl2). In case you weren't aware, I figured I would let you know (although I'm sure you probably know something I don't know with all the pro coders hanging around, so sorry if that is not sufficient)

Edit: Did a whole lot of tests this morning and I found that a pin bar of just 50 % and percentage of length of approx 1.35 increased profitability big time. Adding this to my forward test.

Below is the Pinbar changed code.

Code: Select all

void LookForPinbar()
{
   //Called if there is no rrt. 
   
   //Check for a massive spread widening event and pause the ea whilst it is happening
   CheckForSpreadWidening();
   
   //Examines the current candle. Is it forming a pinbar?
   Candle2Height = (iHigh(NULL, TradingTimeFrame, 1) - iLow(NULL, TradingTimeFrame, 1)) * factor;
   if (CompareDoubles(Candle2Height, 0)) return;
   if(Candle2Height< AverageLength*pinbarPercentageOfLength) return; //Looking for candle bigger than the average candle?
   
   double highest = High[iHighest(NULL, TradingTimeFrame,MODE_HIGH, MinCandlesInSequence, 2)];
   double lowest = Low[iLowest(NULL, TradingTimeFrame,MODE_LOW, MinCandlesInSequence, 2)];
   
   //Rising candle
   if (iClose(NULL,TradingTimeFrame,1) > iOpen(NULL, TradingTimeFrame, 1) )
   {
      //Candle high must be the highest for MinCandlesInSequence candles
      if (iHigh(NULL, TradingTimeFrame, 1) < highest) return;

      //Calculate the wick
      Wick2 = (iHigh(NULL, TradingTimeFrame, 1) - iClose(NULL,TradingTimeFrame,1)) * factor;
      if (!CompareDoubles(Wick2, 0) )
      {
         Wick2Percent = (Wick2 / Candle2Height) * 100;
         if (Wick2Percent < RequiredWick2Percentage) return;//Nothing to do
         //We have a pin bar high
         PbStatus = pinbarhigh;
         return;
      }//if (!CloseEnough(wick2, 0) )
   }//if (Bid > iOpen(NULL, TradingTimeFrame, 0))
   
   //Falling candle
   if (iOpen(NULL, TradingTimeFrame, 1)>iClose(NULL,TradingTimeFrame,1))
   {
      //Candle low must be the lowest for MinCandlesInSequence candles
      if (iLow(NULL, TradingTimeFrame, 1) > lowest) return;
      
      //Calculate the wick      
      Wick2 = (iClose(NULL,TradingTimeFrame,1) - iLow(NULL, TradingTimeFrame, 1)) * factor;
      
      if (!CompareDoubles(Wick2, 0) )
      {
         Wick2Percent = (Wick2 / Candle2Height) * 100;
         if (Wick2Percent < RequiredWick2Percentage) return;//Nothing to do
         //We have a pin bar high
         PbStatus = pinbarlow;
      }//if (!CloseEnough(wick2, 0) )
   }//if (Bid < iOpen(NULL, TradingTimeFrame, 0))
   
   

}//End void LookForPinbar()
Author:  Freedom787 [ Fri Apr 19, 2013 3:34 pm ]
Post subject:  Re: Rail Road Tracks

My EA took a trade today which got stopped out ( eurusd m15). I don't think I will change my settings because there was a significant amount of movement today, more than usual.

What caught my attention, is a nice long wick at the top of this climb in price today. The wick is small compared to the total candle, but very large relative to average candle size. Another calculation I am considering is comparing the wick size to average candle size, regardless of the actual candle.

(And Yes, I see the incredibly large rail road. Didn't have it turned on though. :oops: )
Author:  tex [ Fri Apr 19, 2013 4:55 pm ]
Post subject:  Re: Rail Road Tracks

Great idea Freedom, i ve noticed this too. Steve what do you think ? Lets test this
Author:  Reaper [ Fri Apr 19, 2013 5:14 pm ]
Post subject:  Re: Rail Road Tracks

tex wrote:Great idea Freedom, i ve noticed this too. Steve what do you think ? Lets test this
Hey Tex, your version is running on the 5M TF right?
Author:  tex [ Sat Apr 20, 2013 10:21 pm ]
Post subject:  Re: Rail Road Tracks

Yes it is.
Author:  SteveHopwood [ Sun Apr 21, 2013 6:14 pm ]
Post subject:  Re: Rail Road Tracks

V 1j is in post 1. I have adopted Freedom's idea of an acceptable candle length, so pinbarPercentageOfLength is the new input.

Nice one Freedom.

:D
Author:  Freedom787 [ Mon Apr 22, 2013 5:46 am ]
Post subject:  Re: Rail Road Tracks

Played with some code this weekend, taking trades on a wick larger than average candle size. Results were negative in all my tests.

Maybe if it was refined to wick> 2 * average candles or something along those lines, but the amount of trades it took in my tests were minimal compared to the trades it was already taking, and they were almost all in the negative.
All times are UTC Page 12 of 15