[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A new way to use Stochastic Oscillator



PureBytes Links

Trading Reference Links

The new medium line for stochd() is not the steady and arbitrary
50, but the closer to reality 
 
AVST=MA(StochD(X1),100);

Let us try now to buy lower and sell higher.
The buy level will be 
AVST-Dbuy 
and the sell level will be 
AVST+Dsell. 
If you guess now, optimization may give the best values for the 3 parameters.
Optimize a current stock for all quotations using the code

/*Buy-Sell moving levels for Slow Stochastic*/
Dbuy=Optimize("Dbuy",14,0,20,1);
Dsell=Optimize("Dsell",8,0,20,1);
X1=Optimize("X1",13,10,20,1);
s1=StochD(X1);
AVST=MA(s1,100);
Buy = Cross( s1,AVST-DBuy);
Sell = Cross( AVST+Dsell,s1);
 
Then replace manually the 14, 8, 13 with respective results of your
optimization and scan and back test.
Compare the back test result with the traditional

/*Stochastic buy-sell system*/
buy=cross(stochd(),30);
sell=cross(70,stochd());
 
scan and back test.

I found interesting net profit augmentation.
As for settings, I used buy at low, sell at high with delay 1 day
(it is obvious that you get the signal today and you act tomorrow
and it is always important for back testing. Delay 0 is meaningless,
the signal is first and then the action may be done.)
After the calculation of above parameters, you may see in your
Indicator builder the new curves, pasting the formula:
 
/*Slow Stochastic moving buy-sell levels*/
 
Dbuy=14;
Dsell=8;
X1=13;
MaxGraph=12;
ST3=StochK(X1);
ST33=StochD(X1);
Graph0=ST3;
Graph1=ST33;
AVST=MA(StochD(X1),100);
Graph9=AVST-Dbuy;Graph10=AVST+Dsell;
Graph8=avst;Graph8Style=8;Graph8BarColor=2;
Graph9Style=Graph10Style=8;
Graph9BarColor=Graph10BarColor=1;
 
and replace 14, 8, 13 with the results of optimization.
You may see in att. gif some Results from ^NDX and Athens SE
for the last 20 months.
In some cases the augmentation of net profit is impressive.
In any example I tried there was one sure thing :
14 days for Stochd() and 30, 70 as buy-sell levels is totally 
improper for trading, except ...if we want to maximize our losses
"because of the bearish market".
It is time to renew old-fashion techniques, probably profitable in sixties
when some people were trading commodities and transfered the same
techniques in the Stock Market.
The idea of Stochastic is great, the way we use it should be updated.
With Optimization, recently included in Amibroker techniques, we 
may extend our trading horizon. 
Dimitris Tsokakis

 
 

------=_NextPart_001_0019_01C14C47.CB1ABA40
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-7" http-equiv=Content-Type>
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The new medium line for stochd() is not the steady 
and arbitrary</FONT></DIV>
<DIV><FONT face=Arial size=2>50, but the closer to reality </FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV><FONT size=2><FONT face=Arial>
<DIV>AVST=<B>MA</B>(StochD(X1),100);</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Let us try now to buy lower and sell 
higher.</FONT></DIV>
<DIV><FONT face=Arial size=2>The buy level will be </FONT></DIV>
<DIV><FONT face=Arial size=2>AVST-Dbuy </FONT></DIV>
<DIV><FONT face=Arial size=2>and the sell level will</FONT><FONT face=Arial 
size=2> be </FONT></DIV>
<DIV><FONT face=Arial size=2>AVST+Dsell. </FONT></DIV>
<DIV><FONT face=Arial size=2>If you guess now, optimization may give</FONT><FONT 
face=Arial size=2> the best values for the 3 parameters.</FONT></DIV>
<DIV><FONT face=Arial size=2><STRONG><FONT color=#ff0000>Optimize 
</FONT></STRONG>a <FONT color=#ff0000><STRONG>current stock </STRONG></FONT>for 
<FONT color=#ff0000><STRONG>all quotations </STRONG></FONT>using the 
code</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><FONT face=Arial>/*<STRONG><FONT color=#0000ff>Buy-Sell moving 
levels for Slow Stochastic</FONT></STRONG>*/</FONT></DIV><FONT face=Arial>
<DIV>Dbuy=</FONT><B><FONT size=2>Optimize</B></FONT></FONT><FONT 
face=Arial><FONT size=2>(</FONT><FONT size=2>"Dbuy"</FONT><FONT 
size=2>,</FONT><FONT color=#0000ff size=2><STRONG>14</STRONG></FONT><FONT 
size=2>,</FONT><FONT size=2>0</FONT><FONT size=2>,</FONT><FONT 
size=2>20</FONT><FONT size=2>,</FONT><FONT size=2>1</FONT></FONT><FONT 
face=Verdana size=2><FONT face=Arial>);</FONT></DIV><FONT face=Arial>
<DIV>Dsell=</FONT><B><FONT size=2>Optimize</B></FONT></FONT><FONT 
face=Arial><FONT size=2>(</FONT><FONT size=2>"Dsell"</FONT><FONT 
size=2>,</FONT><FONT color=#0000ff><STRONG><FONT size=2>8</FONT><FONT 
size=2>,</FONT></STRONG></FONT><FONT size=2>0</FONT><FONT size=2>,</FONT><FONT 
size=2>20</FONT><FONT size=2>,</FONT><FONT size=2>1</FONT></FONT><FONT 
face=Verdana size=2><FONT face=Arial>);</FONT></DIV><FONT face=Arial>
<DIV>X1=</FONT><B><FONT size=2>Optimize</B></FONT></FONT><FONT face=Arial><FONT 
size=2>(</FONT><FONT size=2>"X1"</FONT><FONT size=2>,</FONT><FONT color=#0000ff 
size=2><STRONG>13</STRONG></FONT><FONT size=2>,</FONT><FONT 
size=2>10</FONT><FONT size=2>,</FONT><FONT size=2>20</FONT><FONT 
size=2>,</FONT><FONT size=2>1</FONT></FONT><FONT face=Verdana size=2><FONT 
face=Arial>);</FONT></DIV><FONT face=Arial>
<DIV>s1=</FONT><B><FONT size=2>StochD</B></FONT></FONT><FONT face=Verdana 
size=2><FONT face=Arial>(X1);</FONT></DIV><FONT face=Arial>
<DIV>AVST=</FONT><B><FONT size=2>MA</B></FONT></FONT><FONT face=Arial><FONT 
size=2>(s1,</FONT><FONT size=2>100</FONT></FONT><FONT face=Verdana size=2><FONT 
face=Arial>);</FONT></DIV><FONT face=Arial>
<DIV>Buy = </FONT><FONT size=2><STRONG>Cross</STRONG></FONT><FONT size=2>( 
s1,AVST-DBuy);</FONT></FONT></DIV><FONT face=Arial>
<DIV><FONT size=2><B>Sell</B> = <B>Cross</B><FONT 
face=Verdana></FONT></FONT><FONT face=Arial size=2>( 
AVST+Dsell,s1);</FONT></FONT></DIV>
<DIV><FONT face=Verdana></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana><FONT face=Arial size=2>Then replace manuallythe 14, 8, 
13 with respective results of your</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT face=Arial size=2>optimization and <STRONG><FONT 
color=#ff0000>scan </FONT></STRONG>and <FONT color=#ff0000><STRONG>back 
test.</STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT face=Arial size=2>Compare the back testresult 
with the traditional</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>/*Stochastic buy-sell system*/</FONT></DIV>
<DIV><FONT face=Verdana><FONT face=Arial 
size=2>buy=cross(stochd(),30);</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT face=Arial 
size=2>sell=cross(70,stochd());</FONT></FONT></DIV>
<DIV><FONT face=Verdana>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><STRONG><FONT color=#ff0000>scan 
</FONT></STRONG>and <FONT color=#ff0000><STRONG>back 
test.</STRONG></FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT face=Arial size=2>I found interesting net profit 
augmentation.</FONT></DIV>
<DIV><FONT face=Arial size=2>As for settings,&nbsp;I used buy at low, sell at 
high with delay 1 day</FONT></DIV>
<DIV><FONT face=Arial size=2>(it is obvious that you get the signal today and 
you act tomorrow</FONT></DIV>
<DIV><FONT face=Arial size=2>and it is always important for back testing. Delay 
0 is meaningless,</FONT></DIV>
<DIV><FONT face=Arial size=2>the signal is first and then the action may be 
done.)</FONT></DIV>
<DIV><FONT face=Arial size=2>After the calculation of above parameters,you may 
see in your</FONT></DIV>
<DIV><FONT face=Arial size=2>Indicator builder the new curves, pasting the 
formula:</FONT></DIV>
<DIV>&nbsp;<FONT face=Arial size=2></DIV>
<DIV>/*Slow Stochastic moving buy-sell levels*/</DIV>
<DIV></FONT><FONT size=2><FONT face=Arial>&nbsp;</DIV></FONT><FONT 
size=2></FONT><FONT face=Arial>
<DIV>Dbuy=</FONT><FONT color=#0000ff size=2><STRONG>14</STRONG></FONT><FONT 
size=2></FONT><FONT face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV>Dsell=</FONT><FONT color=#0000ff size=2><STRONG>8</STRONG></FONT><FONT 
size=2></FONT><FONT face=Arial>;</FONT></FONT></DIV>
<DIV><FONT face=Arial>
<DIV><FONT size=2>X1=<FONT color=#0000ff><STRONG>13</STRONG></FONT><FONT 
face=Arial>;</FONT></FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>MaxGraph=12;</FONT></DIV><FONT face=Arial><FONT 
size=2>
<DIV>ST3=StochK</FONT><FONT face=Arial>(X1);</FONT></FONT></DIV><FONT 
face=Arial><FONT size=2>
<DIV>ST33=StochD</FONT><FONT face=Arial>(X1);</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>Graph0=ST3;</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial>Graph1=ST33;</FONT></FONT></DIV><FONT 
face=Arial><FONT size=2>
<DIV>AVST=MA(StochD</FONT><FONT face=Arial>(X1),100);</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>Graph9=AVST-Dbuy;Graph10=AVST+Dsell;</FONT></DIV>
<DIV><FONT size=2><FONT 
face=Arial>Graph8=avst;Graph8Style=8;Graph8BarColor=2;</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>Graph9Style=Graph10Style=8;</FONT></DIV>
<DIV><FONT size=2><FONT 
face=Arial>Graph9BarColor=Graph10BarColor=1;</FONT></FONT></DIV>
<DIV><FONT face=Arial>&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>and replace 14, 8, 13 with the results of 
optimization.</FONT></DIV>
<DIV><FONT face=Arial size=2>You may see in att. gif some Results from ^NDX and 
Athens SE</FONT></DIV>
<DIV><FONT face=Arial size=2>for the last 20 months.</FONT></DIV>
<DIV><FONT face=Arial size=2>In some cases the augmentation of net profit is 
impressive.</FONT></DIV>
<DIV><FONT face=Arial size=2>In any example I tried there was one sure thing 
:</FONT><FONT size=2></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>14 days for Stochd()</FONT><FONT size=2> and 
30, 70 as buy-sell levels is totally </FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>improper for trading, except ...if 
we</FONT><FONT size=2> want to maximize our losses</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>"because of the bearish market".</FONT></DIV>
<DIV><FONT face=Arial size=2>It is time to renew old-fashion techniques, 
probably profitable in sixties</FONT></DIV>
<DIV><FONT face=Arial size=2>when some people were trading commodities and 
transfered the same</FONT></DIV>
<DIV><FONT face=Arial size=2>techniques in the Stock Market.</FONT></DIV>
<DIV><FONT face=Arial size=2>The idea of Stochastic is great, the way we use it 
should be updated.</FONT></DIV>
<DIV><FONT face=Arial size=2>With&nbsp;Optimization, recently included in 
Amibroker techniques, we&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>may extend our trading horizon.&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>Dimitris Tsokakis</FONT></DIV>
<DIV><FONT size=2>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_001_0019_01C14C47.CB1ABA40--

Attachment:
gif00196.gif
Description: GIF image
Attachment:

Attachment: Description: "Description: GIF image"

Attachment: Description: "gif00197.gif"