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

Rail Road Tracks
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1774
Page 5 of 15
Author:  SteveHopwood [ Fri Apr 05, 2013 11:35 am ]
Post subject:  Re: Rail Road Tracks

I see some incorrect trades on my charts as well. Something wrong in the coding logic.

:D
Author:  Pooler [ Fri Apr 05, 2013 11:40 am ]
Post subject:  Re: Rail Road Tracks

Thank goodness--This is one time when a bloop is a good thing...

Just when I thought I had begun to understand 5% of CJ's strategy with the EA---everything became clear as mud and I was an even bigger dumbass than I thought.... :? :? :?
Author:  Freedom787 [ Fri Apr 05, 2013 1:38 pm ]
Post subject:  Re: Rail Road Tracks

To the best of my understanding, this is that it is supposed to help identify a large reversal area. A significant amount of trades that the EA takes, are not major peaks and valleys, and the trend it was on continues after the railroad. I'm experimenting with a few options to see if we can improve the accuracy. Had no success yet. I did find I was slightly more successful on some trades when the % of the average bar was >100. I found the 50 default option to open too many innacurate trades. I'm testing this on both some lower and higher tf charts.


This picture is from CJ's page. It almost looks like the areas he identifies would correspond with a zig zag indicator, identifying tops and bottoms.However, when you run the zig zag indicator over the EA, they identify very different areas. I'm working on seeing if I can assist the logic in anyway.

Image
Author:  rosst [ Fri Apr 05, 2013 1:50 pm ]
Post subject:  Re: Rail Road Tracks

I am not sure it could be programmed, but another sign of a reversal RRT is a widening spread - of course at HOD/LOD (only seen in hindsight :-() - even better at the previous day's HOD/LOD which gives a nice M or W over 2 days...
Author:  SteveHopwood [ Fri Apr 05, 2013 2:28 pm ]
Post subject:  Re: Rail Road Tracks

To anyone here hacking the code to try to find the problem and who is unfamiliar with my style.

I coed ea's using my Shell, so all of them have the same features.
  • void ReadIndicatorValues() is the function that handles calls to indicators used by the ea. Here, it look for a rrt and sets the variable RrtStatus to one of the constants defined at the top of the file. This function is called from start().
  • void LookForTradingOpportunities() uses the information gathered in ReadIndicatorValues() to make the trading decision. This is called at the end of start().
If ReadIndicatorValues() fails to find a rrt, it goes looking for a pinbar in void LookForPinbar().

Here, I see something that might be causing a problem because the ea is looking for a pinbar on the current candle, so this code:

Code: Select all

//Rising candle
   if (iClose(NULL, TradingTimeFrame, 1) > iOpen(NULL, TradingTimeFrame, 1))
   
should be

Code: Select all

//Rising candle
   if (Bid > iOpen(NULL, TradingTimeFrame, 1))
   
Same sort of thing with the falling candle code block.

It may not make any difference - I do not know whether Close[] and its partner iClose() hold the Bid, or whether this becomes fixed at the open of the next candle. Either way, probably best to change it.

:D
Author:  SteveHopwood [ Fri Apr 05, 2013 2:32 pm ]
Post subject:  Re: Rail Road Tracks

I am seeing lots of errors in the pinbar-spotting code.

Bit worrying really. I was sober when I coded it. :lol:
Author:  Pooler [ Fri Apr 05, 2013 2:39 pm ]
Post subject:  Re: Rail Road Tracks

I always thought you did your best work after a bath and a few drams.....? :lol:
Author:  lucklogic [ Fri Apr 05, 2013 2:47 pm ]
Post subject:  Re: Rail Road Tracks

SteveHopwood wrote:I am seeing lots of errors in the pinbar-spotting code.

Bit worrying really. I was sober when I coded it. :lol:

Please see attachment, have also added criteria for the current bar length, basically have to reference the current bar (not shift 1) - I think that works :roll:
Author:  SteveHopwood [ Fri Apr 05, 2013 2:48 pm ]
Post subject:  Re: Rail Road Tracks

V 1a of RRTnP in post one, with the fixes to the bloops in the pinbar-spotting function. It did not help that the code was looking at the wrong candle. Hey ho.

:D
Author:  SteveHopwood [ Fri Apr 05, 2013 2:53 pm ]
Post subject:  Re: Rail Road Tracks

lucklogic wrote:
SteveHopwood wrote:I am seeing lots of errors in the pinbar-spotting code.

Bit worrying really. I was sober when I coded it. :lol:

Please see attachment, have also added criteria for the current bar length, basically have to reference the current bar (not shift 1) - I think that works :roll:
Hold up on the redownloading for a couple of minutes guys.

lucklogic, multiplying by 10 will only work sometimes - it has to be factor, which is correctly calculated in int init().

I love the idea of the average candle length and am about to add it.

Back in a mo.

:D
All times are UTC Page 5 of 15