- Katılım
- 23 Eki 2020
- Mesajlar
- 1,823
Developing A Trading System by Dennis D. Peterson
{Developing A Trading System by Dennis D. Peterson}
{BUY SIGNAL}
standarddev:=60;
periods:=14;
StochRSI:=(RSI(periods)-LLV(RSI(periods),periods))/
(HHV(RSI(periods),periods)-LLV(RSI(periods),periods));
rdp1:=Round(Stdev(stochrsi,standarddev)/.053);
rdp2:=Round(Stdev(stochrsi,standarddev)/.035);
rdv1:=Round(Stdev(Mov(V,periods,S)/
1000000,standarddev));
adjust1:= rdv1-rdp1+11;
adjust1:=if(adjust1<8,8,adjust1);
adjust1:=if(adjust1>12,12,adjust1);
adjust2:=rdv1-rdp2+14;
adjust2:=if(adjust1<12,12,adjust2);
adjust2:=if(adjust1>20,20,adjust2);
{Setup}
periods:=adjust1;
BBpds:=adjust2;
howclosetoBBbot:=0.9;
longthresholdentry:=0.3;
wprice:=(2*C+H+L)/4;
deviations:=.0625*BBpds+0.75;
botpercentage:=Abs((wprice-BBandBot(wprice,BBpds,S,deviations))/(BBandTop(wprice,BBpds,S,deviations)-BBandBot(wprice,BBpds,S,deviations)));
{entry conditions}
entry1:=botpercentage-howclosetoBBbot<0.3;
entry2:=C*1.05>BBandBot(wprice,BBpds,S,deviations) and
StochRSI>longthresholdentry;
volbb:=If(C>Ref(C,-1),V,0);
entry3:=Volbb>Ref(volbb,-1);
entry4:=(C-O)/(H-L)>.2;
EntryTrigger:=entry1 and entry2 and entry3 and entry4;
EntryTrigger;
→→→→→→→→→→→→→→→→Metastock içindir ASI.DLL dosyanız olması gerekir ←←←←←←←←←←←←←
{Patterson Stochastic RSI And Bollinger Bands Buy Signal}
StochRSI:=(RSI(14)-LLV(RSI(14),14))/(HHV(RSI(14),14)-LLV(RSI(14),14));
rdp1:=Round(Stdev(stochrsi,60)/.053);
rdp2:=Round(Stdev(stochrsi,60)/.035);
rdv1:=Round(Stdev(Mov(V,14,S)/1000000,60));
adjust1:= rdv1-rdp1+11;
adjust1:=If(adjust1<8,8,adjust1);
adjust1:=If(adjust1>12,12,adjust1);
adjust2:=rdv1-rdp2+14;
adjust2:=If(adjust1<12,12,adjust2);
adjust2:=If(adjust1>20,20,adjust2);
StochRSI:=(RSI(adjust1)-ExtFml("ASI.LLV",RSI(adjust1),adjust1))/(ExtFml("ASI.HHV",RSI(adjust1),adjust1)-ExtFml("ASI.LLV",RSI(adjust1),adjust1));
wprice:=(2*C+H+L)/4;
deviations:=.0625*adjust2+0.75;
varBBandTop:=ExtFml("ASI.sma",wprice,adjust2)+deviations*ExtFml("ASI.Stdev",wprice,adjust2,1);
varBbandBot:=ExtFml("ASI.sma",wprice,adjust2)-deviations*ExtFml("ASI.Stdev",wprice,adjust2,1);
botpercentage:=Abs((wprice-varBbandBot)/(varBBandTop-varBBandBot));
{entry conditions}
entry1:=botpercentage-0.9<0.3;
entry2:=C*1.05>varBBandBot and StochRSI>0.3;
volbb:=If(C>Ref(C,-1),V,0);
entry3:=Volbb>Ref(volbb,-1);
{suggested substitute code in S&C letters, V>ValueWhen(2,C>ref(C,-1),V)}
entry4:=(C-O)/(H-L)>.2;
entry1 and entry2 and entry3 and entry4
kaynak
purebytes
{Developing A Trading System by Dennis D. Peterson}
{BUY SIGNAL}
standarddev:=60;
periods:=14;
StochRSI:=(RSI(periods)-LLV(RSI(periods),periods))/
(HHV(RSI(periods),periods)-LLV(RSI(periods),periods));
rdp1:=Round(Stdev(stochrsi,standarddev)/.053);
rdp2:=Round(Stdev(stochrsi,standarddev)/.035);
rdv1:=Round(Stdev(Mov(V,periods,S)/
1000000,standarddev));
adjust1:= rdv1-rdp1+11;
adjust1:=if(adjust1<8,8,adjust1);
adjust1:=if(adjust1>12,12,adjust1);
adjust2:=rdv1-rdp2+14;
adjust2:=if(adjust1<12,12,adjust2);
adjust2:=if(adjust1>20,20,adjust2);
{Setup}
periods:=adjust1;
BBpds:=adjust2;
howclosetoBBbot:=0.9;
longthresholdentry:=0.3;
wprice:=(2*C+H+L)/4;
deviations:=.0625*BBpds+0.75;
botpercentage:=Abs((wprice-BBandBot(wprice,BBpds,S,deviations))/(BBandTop(wprice,BBpds,S,deviations)-BBandBot(wprice,BBpds,S,deviations)));
{entry conditions}
entry1:=botpercentage-howclosetoBBbot<0.3;
entry2:=C*1.05>BBandBot(wprice,BBpds,S,deviations) and
StochRSI>longthresholdentry;
volbb:=If(C>Ref(C,-1),V,0);
entry3:=Volbb>Ref(volbb,-1);
entry4:=(C-O)/(H-L)>.2;
EntryTrigger:=entry1 and entry2 and entry3 and entry4;
EntryTrigger;
→→→→→→→→→→→→→→→→Metastock içindir ASI.DLL dosyanız olması gerekir ←←←←←←←←←←←←←
{Patterson Stochastic RSI And Bollinger Bands Buy Signal}
StochRSI:=(RSI(14)-LLV(RSI(14),14))/(HHV(RSI(14),14)-LLV(RSI(14),14));
rdp1:=Round(Stdev(stochrsi,60)/.053);
rdp2:=Round(Stdev(stochrsi,60)/.035);
rdv1:=Round(Stdev(Mov(V,14,S)/1000000,60));
adjust1:= rdv1-rdp1+11;
adjust1:=If(adjust1<8,8,adjust1);
adjust1:=If(adjust1>12,12,adjust1);
adjust2:=rdv1-rdp2+14;
adjust2:=If(adjust1<12,12,adjust2);
adjust2:=If(adjust1>20,20,adjust2);
StochRSI:=(RSI(adjust1)-ExtFml("ASI.LLV",RSI(adjust1),adjust1))/(ExtFml("ASI.HHV",RSI(adjust1),adjust1)-ExtFml("ASI.LLV",RSI(adjust1),adjust1));
wprice:=(2*C+H+L)/4;
deviations:=.0625*adjust2+0.75;
varBBandTop:=ExtFml("ASI.sma",wprice,adjust2)+deviations*ExtFml("ASI.Stdev",wprice,adjust2,1);
varBbandBot:=ExtFml("ASI.sma",wprice,adjust2)-deviations*ExtFml("ASI.Stdev",wprice,adjust2,1);
botpercentage:=Abs((wprice-varBbandBot)/(varBBandTop-varBBandBot));
{entry conditions}
entry1:=botpercentage-0.9<0.3;
entry2:=C*1.05>varBBandBot and StochRSI>0.3;
volbb:=If(C>Ref(C,-1),V,0);
entry3:=Volbb>Ref(volbb,-1);
{suggested substitute code in S&C letters, V>ValueWhen(2,C>ref(C,-1),V)}
entry4:=(C-O)/(H-L)>.2;
entry1 and entry2 and entry3 and entry4
kaynak
purebytes