iStochastic

 

Hi

Frustrating!! When I use iStochastic in my EA it returns a diffirent value of what I read visualy off my chart. Diffirence up to 10 big!!!!

I have checked and checked my paramaters and it is correct!!

Please help

stoch1=iStochastic(Symbol(),time_period,PeriodsK,PeriodsD,SmoothD,MODE_SMA,PRICE_CLOSE,MODE_MAIN,1);

Print("Current Stoch1 = ",stoch1);

Stoch1 that prints on my EA is totaly different from the visual value!!

 
johanmalan:

Hi

Frustrating!! When I use iStochastic in my EA it returns a diffirent value of what I read visualy off my chart. Diffirence up to 10 big!!!!

I have checked and checked my paramaters and it is correct!!

Please help

stoch1=iStochastic(Symbol(),time_period,PeriodsK,PeriodsD,SmoothD,MODE_SMA,PRICE_CLOSE,MODE_MAIN,1);

Print("Current Stoch1 = ",stoch1);

Stoch1 that prints on my EA is totaly different from the visual value!!

Run in tester visual mode. When it finishes the indicator used for calculations will be shown in the bottom. You can then compare to the one you have attached and maybe find the cause.

Or perhaps you somehow have missing data in one of the timeframes you are fetching from. Happens easy if you switch accounts ie switch history data.

/ McKeen

 
McKeen:

Run in tester visual mode. When it finishes the indicator used for calculations will be shown in the bottom. You can then compare to the one you have attached and maybe find the cause.

Or perhaps you somehow have missing data in one of the timeframes you are fetching from. Happens easy if you switch accounts ie switch history data.

/ McKeen


Hi

See attached file. i just set all the shifts to 0 so that it tracks the current stoch and see the difference as i run it in visual mode. I have tried it on various pairs and the same problem everywhere.

 

i see file do not attach how do I attach file here?

 
johanmalan:

i see file do not attach how do I attach file here?

Just click "Choose File"-button, it is leftmost, downmost. Make a zip if it doesnt show.

/ McKeen

 
McKeen:

Just click "Choose File"-button, it is leftmost, downmost. Make a zip if it doesnt show.

/ McKeen


Thanks will try.

However I just took form IBFX tools a simple stoch cross Over EA and added a print stantment to just show me the stoch level as it runs the back tester and same problem...... So my EA code and an EA I got from IBFX give the same problem. This is confusing!

Reason: