Sayfa 2 Toplam 4 Sayfadan BirinciBirinci 1234 SonuncuSonuncu
Toplam 38 adet sonuctan sayfa basi 11 ile 20 arasi kadar sonuc gösteriliyor

Konu: Metastock indikatörler

  1. #11
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    ATR-based trailing stop value on the closing price.


    {Get the required ATR period;}
    period:=Input("ATR Period :",1,100,5);
    {Calculate the biggest difference based on the true range concept;}
    diff1:=Max(H-L,Abs(H-Ref(C,-1)));
    diff2:=Max(diff1,Abs(L-Ref(C,-1)));
    {Use Wilders' moving average method to calculate the Average True Range;}
    Mov(diff2,period*2-1,E)


    Sidebar code from page 35 of the June 2009 issue:

    ATR TRAILING STOP

    {SVE_Stop_trail_ATR}
    atrper:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    loss:=atrfact*ATR(atrper);
    trail:=
    If(C>PREV AND Ref(C,-1)>PREV,
    Max(PREV,C-loss),
    If(C < PREV AND Ref(C,-1) < PREV,
    Min(PREV,C+loss),
    If(C>PREV,C-loss,C+loss)));
    Trail


    Code from page 36 of the June 2009 issue:

    Long position: SVE_StopLong_Trail_ATR_Date.

    {SVE_StopLong_Trail_ATR_Date - ATR trailing stop long from date}
    InpMonth:=Input("Month",1,12,1);
    InpDay:=Input("Day",1,31,1);
    InpYear:=Input("Year",1800,2050,2009);
    InitStop:=Input("Initial Stop Price",0.1,10000,10);
    atrper:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    loss:=atrfact*ATR(atrper);
    Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
    StopLong:=ExtFml( "AdvancedStop.StopLong", Entry,InitStop,0,C-Loss,0,0,0,0);
    StopLong

    Short position: SVE_StopShort_Trail_ATR_Date.

    {SVE_StopShort_Trail_ATR_Date - ATR trailing stop short from date}
    InpMonth:=Input("Month",1,12,1);
    InpDay:=Input("Day",1,31,1);
    InpYear:=Input("Year",1800,2050,2009);
    InitStop:=Input("Initial Stop Price",0.1,10000,10);
    atrper:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    loss:=atrfact*ATR(atrper);
    Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
    StopShort:=ExtFml("AdvancedStop.StopShort",Entry,
    InitStop,0,C+Loss,0,0,0,0);
    StopShort


    Sidebar code from page 38 of the June 2009 issue:

    ATR MODIFIED

    {SVE_ATR_Mod}
    period:=Input("ATR Period :",1,100,5);
    HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
    Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
    Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
    diff1:=Max(HiLo,Href);
    diff2:=Max(diff1,Lref);
    Wilders(diff2,period);


    Sidebar code from page 39 of the June 2009 issue:

    MODIFIED ATR WITH TRAILING STOPS

    {SVE_Stop_Trail_ATR_Mod}
    period:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
    Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
    Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
    diff1:=Max(HiLo,Href);
    diff2:=Max(diff1,Lref);
    atrmod:=Wilders(diff2,period);
    loss:=atrfact*atrmod;
    trail:=
    If(C>PREV AND Ref(C,-1)>PREV,
    Max(PREV,C-loss),
    If(C < PREV AND Ref(C,-1) < PREV,
    Min(PREV,C+loss),
    If(C>PREV,C-loss,C+loss)));
    Trail


    Sidebar code from page 40 of the June 2009 issue:

    Modified ATR trailing stop from start date

    Since you are using your own trading method to finding entry points, you certainly want
    to be able to use your own entry date. So again, since the number of input parameters in
    MetaStock is limited to six, we have to create separate formulas for a long or a short
    position:

    Long position: SVE_StopLongMod_Trail_ATR_Date.

    {SVE_StopLongMod_Trail_ATR_Date}
    InpMonth:=Input("Month",1,12,1);
    InpDay:=Input("Day",1,31,1);
    InpYear:=Input("Year",1800,2050,2009);
    InitStop:=Input("Initial Stop Price",0.1,10000,10);
    period:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
    Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
    Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
    diff1:=Max(HiLo,Href);
    diff2:=Max(diff1,Lref);
    atrmod:=Wilders(diff2,period);
    loss:=atrfact*atrmod;
    Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
    StopLong:=ExtFml( "AdvancedStop.StopLong", Entry,InitStop,0,C-Loss,0,0,0,0);
    StopLong

    Short position: SVE_StopShortMod_Trail_ATR_Date.

    {SVE_StopShortMod_Trail_ATR_Date}
    InpMonth:=Input("Month",1,12,1);
    InpDay:=Input("Day",1,31,1);
    InpYear:=Input("Year",1800,2050,2009);
    InitStop:=Input("Initial Stop Price",0.1,10000,10);
    period:=Input("ATR period :",1,100,5);
    atrfact:=Input("ATR multiplication :",1,10,3.5);
    HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
    Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
    Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
    diff1:=Max(HiLo,Href);
    diff2:=Max(diff1,Lref);
    atrmod:=Wilders(diff2,period);
    loss:=atrfact*atrmod;
    Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
    StopShort:=ExtFml("AdvancedStop.StopShort",
    Entry,InitStop,0,C+Loss,0,0,0,0);
    StopShort

  2. #12
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    MACD REVERSED CROSSOVER SYSTEM CODE

    For MetaStock Exploration

    Long entry:
    Cross(Mov(MACD( ),9,E),MACD( ))

    Short entry:
    Cross(MACD( ),Mov(MACD( ),9,E))

    For MetaStock TradeSim Enterprise Exploration:

    EntryTrigger := Ref(Cross(Mov(MACD( ),9,E),MACD( )),-1);
    EntryPrice := OPEN;
    ExitTrigger := Ref(Cross(MACD( ),Mov(MACD( ),9,E)),-1);
    ExitPrice := OPEN;
    InitialStop := 0; { no initial stop used }

    ExtFml( "TradeSim.Initialize");
    ExtFml( "TradeSim.RecordTrades",
    "MACD Crossover Reversed", {Trade Data Filename}
    LONG, {Trade Position Type}
    EntryTrigger, {Entry Trigger}
    EntryPrice, {Entry Price }
    InitialStop, {Optional Initial Stop}
    ExitTrigger, {Exit Trigger}
    ExitPrice, {Exit Price}
    START); {Recorder Control}

  3. #13
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    MetaStock code for AUD intermarket system from "Trading The Aussie"

    This system developed by Markos Katsanos exploits the traditionally strong
    correlation between the Australian dollar and commodities.


    BB Divergence indicator
    D1:=Input("BB DAYS " ,1 ,200 ,30 );
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    sec1BOL:= 1+((C- Mov(C,D1,S)+2*Stdev(C,D1))/(4*Stdev(C,D1)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,D1,S)+2*Stdev(SEC2,D1))/(4*Stdev(SEC2,D1)+.0001));
    DIVERG:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIVERG


    AUD intermarket Bollinger band divergence system
    To recreate the tests, click on Enhanced System Tester, click on "New system,"
    and paste in the buy, sell, short, and buy-to-cover code [shown below].


    To run the test, click on "New simulation," add securities, and select the
    Australian dollar (AUD/USD). Then select "Periodicity: Daily." Click on "Next,"
    and select a transaction cost and initial equity of 100,000. Click on "Trade
    execution," uncheck "Realistic market prices," select "Buy price and sell price
    at close with no delay," and fill in the slippage of 0.0002 (two pips) per
    transaction.


    Interest rates for the USD and the AUD fluctuated considerably during the test
    duration, so I had to calculate debit and credit interest manually using
    historical data from Oanda
    (http://fxtrade.oanda.com/tools/stati...st_rates.shtml).

    You will also need to change the first four lines of the code to point to the
    appropriate folder in your hard drive where the XAU, the CRB index, and 90-day
    bank bill futures (YBA) are located.


    If you wish to replicate the test, keep in mind that for the test to begin
    producing any signals, the indicators used should be calculated first, and this
    requires at least 55 extra bars to be loaded.


    Buy
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    sec1BOL:= 1+((C Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2-mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (HHV(DIV1,3)>10 AND DIV1< REF(DIV1,-1) AND ROC(C,2,%)>0
    AND C>(1+.7/100)*LLV(L,4)
    AND (MOV(SEC4,40,S)> REF(MOV(SEC4,40,S),-1)
    OR MOV(SEC5,40,S)> REF(MOV(SEC5,40,S),-1)) )
    OR (DIV1>40 AND DIV2+DIV3>80 AND DIV1< REF(DIV1,-1)
    AND C>REF(C,-1) AND C>(1+.7/100)*LLV(L,4) )
    OR {MA Crossover} (CROSS(MOV(C,15,S),MOV(C,50,S))
    AND MOV(SEC5,40,S)> REF(MOV(SEC5,40,S),-1))

    Sell
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    SEC6:=Security("C:\Metastock Data\REUTERSFOREX\EURJPY=",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MIN(DIV2,DIV3);
    (CROSS(MOV(MACD(),9,E),MACD()) AND HHV(MACD(),5)>REF(HHV(MACD(),50),-5))
    OR (DIV1<-30 AND (ROC(SEC2,1,%)<-.5 OR ROC(SEC3,1,%)<-.5)
    AND C<(1-.7/100)*HHV(H,4)) {Negative Divergence}
    OR ( DIV1<0 AND ROC(SEC6,2,%)<-1 AND C<(1-.7/100)*HHV(H,4)
    AND MOV(SEC6,40,S)< REF(MOV(SEC6,40,S),-1)) {Carry trade liquidation}


    Sell short
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (LLV(DIV1,3)<-10 AND DIV1>REF(DIV1,-1) AND ROC(C,2,%)<0
    AND C<(1-.7/100)*HHV(H,4) AND (MOV(SEC4,40,S)< REF(MOV(SEC4,40,S),-1)
    OR MOV(SEC5,40,S)< REF(MOV(SEC4,40,S),-1))) OR (DIV1<-20
    AND DIV2+DIV3<-40 AND DIV1>REF(DIV1,-1) AND C< REF(C,-1)
    AND C<(1-.7/100)*HHV(H,4)) OR (CROSS(MOV(C,50,S),MOV(C,15,S))
    AND MOV(SEC5,40,S)< REF(MOV(SEC5,40,S),-1))

    Buy to cover
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (CROSS(MACD(),MOV(MACD(),9,E)) AND LLV(MACD(),5)< REF(LLV(MACD(),50),-5))
    OR (DIV1>30 AND (ROC(SEC2,1,%)>.5 OR ROC(SEC3,1,%)>.5)
    AND C>(1+.7/100)*HHV(H,4))


    AUD Expert Advisor
    To avoid the tedious task of running the test every day to check for whether
    there are any new signals, you can create an expert advisor and attach it to
    the AUD/USD chart.


    To create the expert advisor, click on the appropriate icon and then click on
    "New," and fill in an appropriate name (for example, "AUD Intermarket System")
    in the name field and fill in the following in the Notes field: "See article:
    Trading The Australian Dollar by Markos Katsanos published in the February 2009
    issue of TAS&C." Then click on "symbols," select the appropriate action (that
    is, buy), and fill in the same code that you used for the test described above.
    Then click on "Graphic" and select an appropriate graphic (for example, green
    arrows below the price plot). The same procedure should be repeated for the
    sell, short, and buy-to-cover code.

  4. #14
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    MetaStock code for AUD intermarket system from "Trading The Aussie"

    This system developed by Markos Katsanos exploits the traditionally strong
    correlation between the Australian dollar and commodities.


    BB Divergence indicator
    D1:=Input("BB DAYS " ,1 ,200 ,30 );
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    sec1BOL:= 1+((C- Mov(C,D1,S)+2*Stdev(C,D1))/(4*Stdev(C,D1)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,D1,S)+2*Stdev(SEC2,D1))/(4*Stdev(SEC2,D1)+.0001));
    DIVERG:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIVERG


    AUD intermarket Bollinger band divergence system
    To recreate the tests, click on Enhanced System Tester, click on "New system,"
    and paste in the buy, sell, short, and buy-to-cover code [shown below].


    To run the test, click on "New simulation," add securities, and select the
    Australian dollar (AUD/USD). Then select "Periodicity: Daily." Click on "Next,"
    and select a transaction cost and initial equity of 100,000. Click on "Trade
    execution," uncheck "Realistic market prices," select "Buy price and sell price
    at close with no delay," and fill in the slippage of 0.0002 (two pips) per
    transaction.


    Interest rates for the USD and the AUD fluctuated considerably during the test
    duration, so I had to calculate debit and credit interest manually using
    historical data from Oanda
    (OANDA Interest Rates - OANDA FXTrade).

    You will also need to change the first four lines of the code to point to the
    appropriate folder in your hard drive where the XAU, the CRB index, and 90-day
    bank bill futures (YBA) are located.


    If you wish to replicate the test, keep in mind that for the test to begin
    producing any signals, the indicators used should be calculated first, and this
    requires at least 55 extra bars to be loaded.


    Buy
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    sec1BOL:= 1+((C Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2-mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (HHV(DIV1,3)>10 AND DIV1< REF(DIV1,-1) AND ROC(C,2,%)>0
    AND C>(1+.7/100)*LLV(L,4)
    AND (MOV(SEC4,40,S)> REF(MOV(SEC4,40,S),-1)
    OR MOV(SEC5,40,S)> REF(MOV(SEC5,40,S),-1)) )
    OR (DIV1>40 AND DIV2+DIV3>80 AND DIV1< REF(DIV1,-1)
    AND C>REF(C,-1) AND C>(1+.7/100)*LLV(L,4) )
    OR {MA Crossover} (CROSS(MOV(C,15,S),MOV(C,50,S))
    AND MOV(SEC5,40,S)> REF(MOV(SEC5,40,S),-1))

    Sell
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    SEC6:=Security("C:\Metastock Data\REUTERSFOREX\EURJPY=",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MIN(DIV2,DIV3);
    (CROSS(MOV(MACD(),9,E),MACD()) AND HHV(MACD(),5)>REF(HHV(MACD(),50),-5))
    OR (DIV1<-30 AND (ROC(SEC2,1,%)<-.5 OR ROC(SEC3,1,%)<-.5)
    AND C<(1-.7/100)*HHV(H,4)) {Negative Divergence}
    OR ( DIV1<0 AND ROC(SEC6,2,%)<-1 AND C<(1-.7/100)*HHV(H,4)
    AND MOV(SEC6,40,S)< REF(MOV(SEC6,40,S),-1)) {Carry trade liquidation}


    Sell short
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    SEC5:=100-Security("C:\Metastock Data\REUTERSFOREX\@:YBAc1",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (LLV(DIV1,3)<-10 AND DIV1>REF(DIV1,-1) AND ROC(C,2,%)<0
    AND C<(1-.7/100)*HHV(H,4) AND (MOV(SEC4,40,S)< REF(MOV(SEC4,40,S),-1)
    OR MOV(SEC5,40,S)< REF(MOV(SEC4,40,S),-1))) OR (DIV1<-20
    AND DIV2+DIV3<-40 AND DIV1>REF(DIV1,-1) AND C< REF(C,-1)
    AND C<(1-.7/100)*HHV(H,4)) OR (CROSS(MOV(C,50,S),MOV(C,15,S))
    AND MOV(SEC5,40,S)< REF(MOV(SEC5,40,S),-1))

    Buy to cover
    SEC2:=Security("C:\Metastock Data\REUTERSINDEX\.XAU",C);
    SEC3:=Security("C:\Metastock Data\REUTERSINDEX\.CRB",C);
    sec1BOL:= 1+((C- Mov(C,30,S)+2*Stdev(C,30))/(4*Stdev(C,30)+.0001));
    sec2BOL:=1+((SEC2- Mov(SEC2,30,S)+2*Stdev(SEC2,30))/(4*Stdev(SEC2,30)+.0001));
    sec3BOL:=1+((SEC3- Mov(SEC3,30,S)+2*Stdev(SEC3,30))/(4*Stdev(SEC3,30)+.0001));
    DIV2:=(sec2BOL-sec1BOL)/sec1bol*100;
    DIV3:=(sec3BOL-sec1BOL)/sec1bol*100;
    DIV1:=MAX(DIV2,DIV3);
    (CROSS(MACD(),MOV(MACD(),9,E)) AND LLV(MACD(),5)< REF(LLV(MACD(),50),-5))
    OR (DIV1>30 AND (ROC(SEC2,1,%)>.5 OR ROC(SEC3,1,%)>.5)
    AND C>(1+.7/100)*HHV(H,4))


    AUD Expert Advisor
    To avoid the tedious task of running the test every day to check for whether
    there are any new signals, you can create an expert advisor and attach it to
    the AUD/USD chart.


    To create the expert advisor, click on the appropriate icon and then click on
    "New," and fill in an appropriate name (for example, "AUD Intermarket System")
    in the name field and fill in the following in the Notes field: "See article:
    Trading The Australian Dollar by Markos Katsanos published in the February 2009
    issue of TAS&C." Then click on "symbols," select the appropriate action (that
    is, buy), and fill in the same code that you used for the test described above.
    Then click on "Graphic" and select an appropriate graphic (for example, green
    arrows below the price plot). The same procedure should be repeated for the
    sell, short, and buy-to-cover code.

  5. #15
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    MetaStock code for the heikin-ashi-based oscillator

    From February 2009 Letters to S&C:


    Heikin-Ashi-based oscillator
    Editor,
    I very much enjoyed the article "Trading With The Heikin-Ashi Candlestick
    Oscillator" by Sylvain Vervoort in the December 2008 issue and am still
    studying it.

    When I first came across the heikin-ashi technique a few years ago, I was
    immediately attracted to its potential vis-à-vis its simplicity. Since
    Vervoort seems to be seriously interested in the heikin-ashi technique, I
    would like to share with him (and other readers) a heikin ashi-based
    oscillator that I have created (the MetaStock code is shown below) and
    suggest that he consider improving/building on it and perhaps run some
    long-term and thorough backtests on, for instance, the Standard & Poor's
    500 and sector indexes ETFs (SPY, XLF, XLI, XLK, etc.) to assert its
    usefulness.


    {Heikin-Ashi Counter}
    period:=Input("Periods",5,100,12);
    haclose:=(O+H+L+C)/4;
    haopen:=(PREV+Ref(haclose,-1))/2;
    hahigh:=Max(Max(H,haopen),haclose);
    halow:=Min(Min(L,haopen),haclose);
    counter:=If(hahigh>Ref(hahigh,-1) AND
    halow>Ref(halow,-1),1,If(hahigh< Ref(hahigh,-1) AND
    halow< Ref(halow,-1),-1,0));
    indic:=Sum(counter,period)/period*100;
    indic;


    --Name Withheld


    Sylvain Vervoort replies:
    I am providing some test results for your heikin-ashi counter formula. [See
    Figures 1 and 2.-Editor]

    Getting positive results from using any single indicator is not easy. Either
    you have to create crossovers using an additional average or smooth it so much
    that it would be possible to trade on the turning points. Both of these methods
    create too much delay to make it an automatic, profitable system. Another method
    would be to use certain oscillator levels as buying and selling references, but
    in that case you must have an oscillator that attains highest and lowest levels
    a lot of the time.

    So I tested the latter using your formula with just five days' counting. The
    test formula is as follows:


    period:=5;
    haclose:=(O+H+L+C)/4;
    haopen:=(PREV+Ref(haclose,-1))/2;
    hahigh:=Max(Max(H,haopen),haclose);
    halow:=Min(Min(L,haopen),haclose);
    counter:=If(hahigh>Ref(hahigh,-1) AND
    halow>Ref(halow,-1),1,If(hahigh< Ref(hahigh,-1) AND
    halow< Ref(halow,-1),-1,0));
    indic:=Sum(counter,period)/period*100;
    buy:=indic>-20;
    sell:=indic<-20;


    Each stock has $1,000 to start with and there is no profit or loss sharing with
    the other stocks. Further, we are going long only. I get a 70% profit with an
    average of 68 trades per stock (inclusive of brokerage commissions) using 57
    Dutch midcap stocks, from the beginning of 2003 until the end of December 2008.
    Considering the current situation, this result is certainly not bad. Results
    from a buy & hold approach will probably be negative these days. If I run the
    same test using the same starting date but stopping at August 2007, I get a
    profit of 144% with an average of 46 trades. (See Figures 1 and 2.)

    You can probably experiment further with the formula and try other markets. I
    get slightly better results, with only about half the number of trades, if I
    use the heikin-ashi closing price average as a reference (all heikin-ashi
    price levels divided by 4) that I normally use.

  6. #16
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    MetaStock code for the Special K and MA, weekly


    p1:=Input("Enter MA Value",1,500,52);
    p2:=Input("Enter MA Value",1,500,26);

    (Mov(ROC(C,4,%),4, E)*1)+(Mov(ROC(C,5,%),5, E)
    *2)+(Mov(ROC(C,6,%),6, E)*3)+(Mov(ROC(C,8,%),6, E)*5)+
    (Mov(ROC(C,10,%),10,E)*1)+((Mov(ROC(C,13,%),13,E)* 2)+
    (Mov(ROC(C,15,%),15,E)*3)+(Mov(ROC(C,20,%),20,E)*4 )*1)+
    ((Mov(ROC(C,39,%),26,E)*1)+(Mov(ROC(C,52,%),26,E)* 2)+
    (Mov(ROC(C,78,%),26,E)*3)+(Mov(ROC(C,104,%),39,E)* 4)*1);

    Mov(Mov((Mov(ROC(C,4,%),4, E)*1)+(Mov(ROC(C,5,%),5, E)*2)+
    (Mov(ROC(C,6,%),6, E)*3)+(Mov(ROC(C,8,%),6, E)*5)+
    (Mov(ROC(C,10,%),10,E)*1)+((Mov(ROC(C,13,%),13,E)* 2)+
    (Mov(ROC(C,15,%),15,E)*3)+(Mov(ROC(C,20,%),20,E)*4 )*1)+
    ((Mov(ROC(C,39,%),26,E)*1)+(Mov(ROC(C,52,%),26,E)* 2)+
    (Mov(ROC(C,78,%),26,E)*3)+(Mov(ROC(C,104,%),39,E)* 4)*1),p1,S),p2,S);

    zero:=0;
    zero;

  7. #17
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    Special K and MA Formula for METASTOCK Daily


    p1:= Input("Enter First MA Time Span",1,500,100);
    p2:= Input("Enter First MA Time Span",1,500,100);
    (Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2 )+
    (Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4 )+
    Mov(ROC(C,50,%),50,S)*1+(Mov(ROC(C,65,%),65,S)*2)+
    (Mov(ROC(C,75,%),75,S)*3)+(Mov(ROC(C,100,%),100,S) *4)+
    (Mov(ROC(C,195,%),130,S)*1)+(Mov(ROC(C,265,%),130, S)*2)+
    (Mov(ROC(C,390,%),130,S)*3)+(Mov(ROC(C,530,%),195, S)*4);

    Mov(Mov((Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%) ,10,S)*2)+
    (Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4 )+
    Mov(ROC(C,50,%),50,S)*1+(Mov(ROC(C,65,%),65,S)*2)+
    (Mov(ROC(C,75,%),75,S)*3)+(Mov(ROC(C,100,%),100,S) *4)+
    (Mov(ROC(C,195,%),130,S)*1)+(Mov(ROC(C,265,%),130, S)*2)+
    (Mov(ROC(C,390,%),130,S)*3)+(Mov(ROC(C,530,%),195, S)*4),p1,S),p2,S);

    zero:=0;
    zero;
    zero:=0;

  8. #18
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    ARSI MetaStock Formula

    With thanks to William Golson of Equis Technical Support and the MetaStock
    Forum Crew for their Forum.dll file:

    {ARSI MetaStock formula}
    Period:=Input("ARSI Time Period ->",1,100,14);
    UpCount:=Sum(If(ROC(C,1,$)>=0,1,0),Period);
    DnCount:=Period-UpCount;
    UpMove:=ExtFml("Forum.MOV",If(ROC(C,1,$)>=0,ROC(C, 1,$),0),UpCount*2-1,E);
    DnMove:=ExtFml("Forum.MOV",If(ROC(C,1,$)<0,Abs(ROC (C,1,$)),0),DnCount*2-1,E);
    RS:=UpMove/(DnMove+0.0001);
    100-(100/(1+RS));

    To use this formula, you need the external forum.dll file that has a function
    for a dynamic moving average. You can find this file on the Equis forum at
    http://forum.equis.com/.
    Forum.dll

  9. #19
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    METASTOCK CODE FOR THE MACD LEADER

    Indicator1:=Mov(C,12,E)+Mov(C-Mov(C,12,E),12,E);
    Indicator2:=Mov(C,26,E)+Mov(C-Mov(C,26,E),26,E);
    Leader:=Indicator1-Indicator2;
    Leader;

  10. #20
    Üyelik tarihi
    03.Mart.2009
    Nereden
    Ankara
    Yaş
    57
    Mesajlar
    3,712
    Teşekkür / Beğeni

    Standart

    IMPROVIAN CODE FOR THE MACD LEADER

    Var
    shortEMA:=EMA(C,12);
    LongEMA:=EMA(C,26);
    Indicator1:=ShortEMA+EMA(C-ShortEMA,12);
    Indicator2:=LongEMA+EMA(C-LongEMA,26);
    Leader:=Indicator1-Indicator2;
    End_Var

    Return Leader;

Sayfa 2 Toplam 4 Sayfadan BirinciBirinci 1234 SonuncuSonuncu

Konu Bilgileri

Bu Konuya Gözatan Kullanıcılar

Şu anda 1 kullanıcı bu konuyu görüntülüyor. (0 kayıtlı ve 1 misafir)

Benzer Konular

  1. Cevap: 0
    Son Mesaj : 24.Mayıs.2009, 11:30

Yetkileriniz

  • Konu Acma Yetkiniz Yok
  • Cevap Yazma Yetkiniz Yok
  • Eklenti Yükleme Yetkiniz Yok
  • Mesajınızı Değiştirme Yetkiniz Yok
  •  
YASAL UYARI
Ekonomi, Borsa ve Para piyasaları" bölümünde yer alan yatırım bilgi, yorum ve tavsiyeleri yatırım danışmanlığı kapsamında değildir. Yatırım danışmanlığı hizmeti Sermaye Piyasası Kurulu tarafından yayımlanan Seri:V, No:52 Sayılı "Yatırım Danışmanlığı Faaliyetine ve Bu Faaliyette Bulunacak Kurumlara İlişkin Esaslar Hakkında Tebliğ" çerçevesinde aracı kurumlar, portföy yönetim şirketleri, mevduat kabul etmeyen bankalar ile müşteri arasında imzalanacak yatırım danışmanlığı sözleşmesi çevresinde sunulmaktadır. Burada ulaşılan sonuçlar tercih edilen hesaplama yöntemi ve/veya yorum ve tavsiyede bulunanların kişisel görüşlerine dayanmakta olup, mali durumunuz ile risk ve getiri tercihlerinize uygun olmayabileceğinden sadece burada yer alan bilgilere dayanılarak yatırım kararı verilmesi sağlıklı sonuçlar doğurmayabilir.Yatırımcıların verecekleri yatırım kararları ile bu sitede bulunan veriler, görüş ve bilgi arasında bir bağlantı kurulamayacağı gibi, söz konusu yorum/görüş/bilgilere dayanılarak alınacak kararların neticesinde oluşabilecek yanlışlık veya zararlardan www.keyborsa.com web sitesi ve/veya yöneticileri sorumlu tutulmaz.
Google Privacy Policy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193