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

Gday: a D1 Stochastic OB/OS trading robot
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=168
Page 67 of 71
Author:  Caillou [ Wed Oct 10, 2012 8:30 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

fxozgirl wrote:
Caillou wrote:Good morning,

Yesterday I finished all the thread reading and thanks to Steve, Shelley, Gary, Will and everyone for this beautifull system. I was not sure about testing this due to Gary´s backtests but since forward tests look so good and the EA´s logic seems a bit different in both cases, I have started a live test with MultiGday.
At the open of the new D1 Candle 5 trades were opened yesterday, without any error, all correct (Admiral Markets Standard Account).

Thanks again.

Cheers

I think it's best to disregard Gary's test (no disrespect Gary :D ) at this stage...I don't think he is using the correct entry criteria for the strategy. Hopefully with the discussion happening Gary will be able to set up his Tradestation to match the strategy and test again for us.
Yes, absolutely agreed. That´s why I´m in...... :D
Author:  snowy [ Wed Oct 10, 2012 10:00 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

@shelley: steve is already coding the new version right now? the reason why i suggested Will to publish his already coded EA here was, to save steve's time for making a complete re-code. :|
Author:  fxozgirl [ Wed Oct 10, 2012 10:10 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

snowy wrote:@shelley: steve is already coding the new version right now? the reason why i suggested Will to publish his already coded EA here was, to save steve's time for making a complete re-code. :|

Yes, Steve is already coding...however if Will has used Steve's code for the trade entry, the same problem with taking trades will occur.
Author:  gaheitman [ Wed Oct 10, 2012 11:23 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

fxozgirl wrote:
So the questions to be asked are:

check on the first tick of the new candle (for a buy trade):
'Was the stoch line & signal line both under 20 level sometime between the 1st tick & the last tick of the old candle'

if yes,

'Is the stoch line & signal line both over 20 level on the first tick of the new candle'

if yes again, take the trade, if no - no trade
Now the difficult part is trying to code this, which Steve is still trying to get his head around...I really hope he can!
Just to be clear, this means that you don't ever have to be OB or OS at the close of the candle, right?

As far as coding, Steve could probably just change the current code to check every minute (if it isn't already) and record the extreme values of the stoch as he goes. Something like:

Code: Select all

   
//in GetStoch() -- would also need to set HighStochMain/Signal to -1 and LowStochMain/Signal to 101 after using them for trade determination
HighStochMain = MathMax(HighStochMain,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   HighStochSignal = MathMax(HighStochSignal,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   LowStochMain = MathMin(MinStochMain,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   LowStochSignal = MathMin(MinStochSignal,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
and the test would be

Code: Select all

//in LFTO()
   //This code will trigger a trade only at the start of a new candle (since modified by ChillOutShelley)
   if (HighStochSignal >= OverBought && StochSignal < OverBought)
   {
      TradingStatus = selltriggered;//Will probably change this to a local bool, but leave for now
   }//if (HighStochSignal >= OverBought && StochSignal < OverBought)
   
   if (LowStochSignal <= OverSold && StochSignal > OverSold)
   {
      TradingStatus = buytriggered;//Will probably change this to a local bool, but leave for now
   }//if (LowStochSignal <= OverSold && StochSignal > OverSold)
I may not see it, but Steve's current code only seems to be looking at the Signal line. He would need to update the code to examine both lines.

George
Author:  snowy [ Wed Oct 10, 2012 11:37 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

gaheitman wrote: I may not see it, but Steve's current code only seems to be looking at the Signal line. He would need to update the code to examine both lines.

George
line 3596 in steve's code:

Code: Select all

//Stoch signal line always lags the main line, so we only need to check the signal
do you mean this?
Author:  fxozgirl [ Wed Oct 10, 2012 11:40 am ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

gaheitman wrote:
Just to be clear, this means that you don't ever have to be OB or OS at the close of the candle, right?

As far as coding, Steve could probably just change the current code to check every minute (if it isn't already) and record the extreme values of the stoch as he goes. Something like:

Code: Select all

   
//in GetStoch() -- would also need to set HighStochMain/Signal to -1 and LowStochMain/Signal to 101 after using them for trade determination
HighStochMain = MathMax(HighStochMain,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   HighStochSignal = MathMax(HighStochSignal,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   LowStochMain = MathMin(MinStochMain,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
   LowStochSignal = MathMin(MinStochSignal,iStochastic(NULL, StochTimeFrame, K_Period, D_Period, Slowing, MODE_SMA, 0, MODE_MAIN,0));
and the test would be

Code: Select all

//in LFTO()
   //This code will trigger a trade only at the start of a new candle (since modified by ChillOutShelley)
   if (HighStochSignal >= OverBought && StochSignal < OverBought)
   {
      TradingStatus = selltriggered;//Will probably change this to a local bool, but leave for now
   }//if (HighStochSignal >= OverBought && StochSignal < OverBought)
   
   if (LowStochSignal <= OverSold && StochSignal > OverSold)
   {
      TradingStatus = buytriggered;//Will probably change this to a local bool, but leave for now
   }//if (LowStochSignal <= OverSold && StochSignal > OverSold)
I may not see it, but Steve's current code only seems to be looking at the Signal line. He would need to update the code to examine both lines.

George
That's right...on both counts.
I have also asked Steve to include both lines of the Stoch.
Author:  akara [ Wed Oct 10, 2012 2:53 pm ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

here's the EA i made that trade GDay on multiple currencies, just finished testing and should be good to go. i also made NB multi-currency EA but Paul beat me to it to publish it so...

anyway, this ea is not exactly like steve's ea feature-wise, but entry / exit are the same, so does tp, be, an jsl, also has basket trade feature.

by the way, this EA uses LibOrderReliable4 so if anybody want to use it remember to install that library.

last of all, thank you shelly for coming up this system and also steve for original ea.

will[/quote]


I cant load MultiGday to any Pair. i get this error 'Cannot open file 'C:\Android\experts\MultiGday.ex4' on the GBPCHF D1'

What have I done wrong..

Regards

Akara
Author:  garyfritz [ Wed Oct 10, 2012 6:56 pm ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

fxozgirl wrote:
gaheitman wrote:Just to be clear, this means that you don't ever have to be OB or OS at the close of the candle, right?
As far as coding, Steve could probably just change the current code to check every minute (if it isn't already) and record the extreme values of the stoch as he goes. Something like:
and the test would be

Code: Select all

//in LFTO()
   //This code will trigger a trade only at the start of a new candle (since modified by ChillOutShelley)
   if (HighStochSignal >= OverBought && StochSignal < OverBought)
That's right...on both counts.
I have also asked Steve to include both lines of the Stoch.
OK. So the test is not "stoch at CLOSE >= OB and stoch at OPEN < OB," but "HIGHEST stoch in the candle >= OB and stoch at open < OB" ?

If so, then you wouldn't need to check every minute to get the "highest stoch." Just use the daily High in the calculation.

Shelley, how are you including both lines of the stoch?

(And no worries about telling people to ignore my test! I had it wrong! :D)
Author:  gaheitman [ Wed Oct 10, 2012 8:14 pm ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

garyfritz wrote:
fxozgirl wrote:
gaheitman wrote:Just to be clear, this means that you don't ever have to be OB or OS at the close of the candle, right?
As far as coding, Steve could probably just change the current code to check every minute (if it isn't already) and record the extreme values of the stoch as he goes. Something like:
and the test would be

Code: Select all

//in LFTO()
   //This code will trigger a trade only at the start of a new candle (since modified by ChillOutShelley)
   if (HighStochSignal >= OverBought && StochSignal < OverBought)
That's right...on both counts.
I have also asked Steve to include both lines of the Stoch.
OK. So the test is not "stoch at CLOSE >= OB and stoch at OPEN < OB," but "HIGHEST stoch in the candle >= OB and stoch at open < OB" ?

If so, then you wouldn't need to check every minute to get the "highest stoch." Just use the daily High in the calculation.
Sure, but then you'd have to write your own stochastics code instead of just calling iStochastics() 1440 times a day. It's too late in the day to be sure, but I think there could also be an issue using just the high in the cases where the bar in question is contributing to the high or the low of the 8-day range. I'll let you work out the math, since you have more hours left in your day :>

George
Author:  fxozgirl [ Wed Oct 10, 2012 8:16 pm ]
Post subject:  Re: Gday: a D1 Stochastic OB/OS trading robot

garyfritz wrote:
fxozgirl wrote: That's right...on both counts.
I have also asked Steve to include both lines of the Stoch.
OK. So the test is not "stoch at CLOSE >= OB and stoch at OPEN < OB," but "HIGHEST stoch in the candle >= OB and stoch at open < OB" ?

If so, then you wouldn't need to check every minute to get the "highest stoch." Just use the daily High in the calculation.

Shelley, how are you including both lines of the stoch?

(And no worries about telling people to ignore my test! I had it wrong! :D)

Yes, that would be the test :D
edit: I just saw George's post...I'll leave that part to you coding guru's, but that test to me sounds like it would be ok to me ;)

I've been thinking more about the 2 stoch lines...I think Steve may have that right as far as only checking the signal line as it does always lag the main line, perhaps because of the incorrect stoch trigger it 'appeared' that the signal line was being ignored....if that makes any sense :?
All times are UTC Page 67 of 71