PureBytes Links
Trading Reference Links
|
Ashish, all the MetaStock formulae posted earlier work just fine
without any problems at my end. Please make sure that you copy &
paste the complete formulae, and that you name the indicator "Ashish
system" correctly.
Unfortunately, due to a busy work-schedule I am not in a position
where I can offer free personal MetaStock tuition, so I won't be able
to explain the posted formula line by line.
Please take my advice and read through the MetaStock formula primer,
and also experiment with sections of the posted code to aid in your
understanding.
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, ashish gupta <loveashu_1@xxx>
wrote:
>
> Hi Jose Silva,
>
> Thanks a lot for your help. I tried creating the expert advisor
with your formula but was not able to make it successfully.
>
> First I was able to understand only the following part of your
formula -
> SMA }
> sma:=Mov(C,pds,S);
>
> { Bar crosses clear above SMA }
> signalUp:=Cross(L,sma);
>
> { Breach of signal High }
> signalHi:=ValueWhen(1,signalUp,H);
> entry:=Cross(C,signalHi);
>
> { Bar crosses clear below SMA }
> signalDw:=Cross(sma,H);
>
> { Breach of signal Low }
> signalLo:=ValueWhen(1,signalDw,L);
> exit:=Cross(signalLo,C);
>
> Apart from the above I could not understand the rest part of your
> formula.
>
> I created the above formulas and put the expert advisor on the
> scrip. But it was giving many signals (half correct and half wrong).
>
> Please advise me what should I do now and how should i make rest
> of your formula and what does that means.
>
> Thanks
> Ashish
>
>
>
> Jose Silva <josesilva22@xxx> wrote:
>
> Ashish, below is your system signals indicator.
>
> =============
> Ashish system
> =============
> ---8<-----------------------------
>
> { Ashish system trade signals v1.0
>
> ©Copyright 2006 Jose Silva.
> For personal use only.
> http://www.metastocktools.com }
>
> { User inputs for indicator output }
> pds:=Input("SMA periods",1,252,50);
> plot:=Input("Signals: [1]Clean, [2]All, [3]Trade binary",1,3,1);
> delay:=Input("Entry and Exit delay",0,5,0);
>
> { SMA }
> sma:=Mov(C,pds,S);
>
> { Bar crosses clear above SMA }
> signalUp:=Cross(L,sma);
>
> { Breach of signal High }
> signalHi:=ValueWhen(1,signalUp,H);
> entry:=Cross(C,signalHi);
>
> { Bar crosses clear below SMA }
> signalDw:=Cross(sma,H);
>
> { Breach of signal Low }
> signalLo:=ValueWhen(1,signalDw,L);
> exit:=Cross(signalLo,C);
>
> { Clean signals }
> init:=Cum(IsDefined(entry+exit))=1;
> bin:=ValueWhen(1,entry-exit<>0 OR init,entry);
> long:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1);
> short:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1);
> signals:=long-short;
>
> { Plot in own window }
> Ref(If(plot=2,entry,0),-delay);
> Ref(If(plot=1,signals,
> If(plot=2,-exit,bin)),-delay)
>
> ---8<-----------------------------
>
> To reference the indicator's default signals in your expert advisor:
>
> ======
> Trends
> ======
> ---8<------------------
> y:=FmlVar("Ashish system","BIN");
> buy:=y=1;
> sell:=y=-1;
> buy;
> {sell}
> ---8<------------------
>
> =======
> Symbols
> =======
> ---8<------------------
> x:=Fml("Ashish system");
> buy:=x=1;
> sell:=x=-1;
> buy;
> {sell}
> ---8<------------------
>
> If you are not sure about the necessary basics needed to implement
> the above, please consult your MetaStock manual and/or the
> MetaStock formula primer available from the files section.
>
>
> jose '-)
> http://www.metastocktools.com
>
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, ashish gupta <loveashu_1@>
> wrote:
>
> Hi all,
>
> I want to create an expert advisor/indicator in metastock.
>
> Buy Signal
> Buy when a full bar is made above the 50 day Moving average
> (i.e. low of the bar should be above the 50 DMA) and high of that
> bar is breached.
>
> Sell Signal
> Buy when a full bar is made below the 50 day Moving average
> (i.e. high of the bar should be below 50 DMA) and low of that bar
> is breached.
>
> I know how to write equation for the bar above/below 50 DMA
> For Buy - Low > Mov(C,50,S)
> For Sell - High < Mov(C,50,S)
>
> but i dont know what and how to add the breach condition in the
> above formula.
>
> Please advise me how to do create this expert advisor.
>
> Thanx
>
> Regards,
> Ashish Gupta
>
> 9810046324
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|