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

Using 10.7_3.30STO_wTS_HT ALERT in an EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3757
Page 1 of 2
Author:  traderduke [ Wed Jul 30, 2014 5:54 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

Can anybody show me the syntax set up for using Tommas's stoc indicator?? I have the Wpr S&R & the mas indictors working but I can't get the stochastic working. I attached the EA & the WprS&R indicator for testing.

Thank you for any help

Ray
Author:  milanese [ Fri Aug 01, 2014 5:03 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

traderduke » Wed Jul 30, 2014 5:54 pm wrote:Can anybody show me the syntax set up for using Tommas's stoc indicator?? I have the Wpr S&R & the mas indictors working but I can't get the stochastic working. I attached the EA & the WprS&R indicator for testing.

Thank you for any help

Ray
Hi Ray,

as for an use in an EA you do not need the extra funtions the indicator has and there will be no need for the MTF capacity, it will do it just using the "normal" stoch, like here http://www.stevehopwoodforex.com/phpBB3 ... =37&t=3565

Cheers :)

Tommaso
Author:  traderduke [ Fri Aug 01, 2014 7:33 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

Tommaso
Please look at lines 303-307 that's where I tried to use the Dream team function but no worky. The get stochastic seems to be my problem. I put it in and took it out.

Thanks

Ray
Author:  milanese [ Fri Aug 01, 2014 7:59 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

traderduke » Fri Aug 01, 2014 7:33 pm wrote:Tommaso
Please look at lines 303-307 that's where I tried to use the Dream team function but no worky. The get stochastic seems to be my problem. I put it in and took it out.

Thanks

Ray
Try this:

Code: Select all

if(d==1 && BrokerHasSundayCandle && Period()==1440) m_bar=m_bar+1;

   dStochMain[0]=GetStochastic(Symbol(),PERIOD_H4,KPeriod,DPeriod,Slowing,Method,Price,MODE_MAIN,0);
   dStochMain[1]=GetStochastic(Symbol(),PERIOD_H4,KPeriod,DPeriod,Slowing,Method,Price,MODE_MAIN,m_bar+1);
   DailyStochMain=GetStochastic(Symbol(),HigherTF_Used,K_period_HT,D_period_HT,S_period_HT,STOCH_MAIN_Ma_HT,STOCH_MAIN_Price_HT,MODE_MAIN,0);
   WeeklyStochMain=GetStochastic(Symbol(),HigherTF2_Used,K_period_HT,D_period_HT,S_period_HT,STOCH_MAIN_Ma_HT,STOCH_MAIN_Price_HT,MODE_MAIN,0);
and:

Code: Select all

double GetStochastic(string symbol,int tf,int kp,int dp,int slow,int meth,double pri,int mode,int shift)
  {

   return(iStochastic(symbol,tf,kp,dp,slow,meth,pri,mode,shift));

  }//double GetStochastic(int tf, int shift)
Cheers :)

Tommaso
Author:  traderduke [ Fri Aug 01, 2014 8:48 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

Tommaso
I couldn't get it to compile, 6 errors such as: arrays required , d -undeclared identifier etc. Check out lines 296 to 299 ???

Thanks
Ray
Author:  milanese [ Fri Aug 01, 2014 9:29 pm ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

traderduke » Fri Aug 01, 2014 8:48 pm wrote:Tommaso
I couldn't get it to compile, 6 errors such as: arrays required , d -undeclared identifier etc. Check out lines 296 to 299 ???

Thanks
Ray
sure you must do some changes in your code to use this like defining the arrays ecc..

Code: Select all

double dStochMain[8];
Cheers :)

Tommaso
Author:  traderduke [ Wed Aug 06, 2014 10:42 am ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

Tommaso

I afraid I'm not getting it. Is it possible to put the 3 stoc's in a void that can be put into any EA.

Sorry, I wish I was as good a coder as you think I am.

Thank you for your interest

Ray
Author:  milanese [ Wed Aug 06, 2014 10:53 am ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

traderduke » Wed Aug 06, 2014 10:42 am wrote:Tommaso

I afraid I'm not getting it. Is it possible to put the 3 stoc's in a void that can be put into any EA.

Sorry, I wish I was as good a coder as you think I am.

Thank you for your interest

Ray
try this modified code it should work..
10_7Traderduke.mq4
Cheers :)

Tommaso
Author:  traderduke [ Mon Aug 11, 2014 3:07 am ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

tommaso
The EA apparently isn't seeing the daily & weekly stoc. Both sells went against the daily & weekly stoc's. this was a backtest of course. I loaded the 10.7_3.3 indicator onto the backtest chart in the beginning of the test. I was seeing the same thing during forward testing.

-see attached picture

Any ideas??

Ray
Author:  milanese [ Mon Aug 11, 2014 7:29 am ]
Post subject:  Using 10.7_3.30STO_wTS_HT ALERT in an EA

traderduke » Mon Aug 11, 2014 3:07 am wrote:tommaso
The EA apparently isn't seeing the daily & weekly stoc. Both sells went against the daily & weekly stoc's. this was a backtest of course. I loaded the 10.7_3.3 indicator onto the backtest chart in the beginning of the test. I was seeing the same thing during forward testing.

-see attached picture

Any ideas??

Ray
The 10.7 stoch indi is not working in backtest proper, please check your EA in forwardtest, I did a look in your code and it should work as intended..

Cheers :)

Tommaso
All times are UTC Page 1 of 2