PureBytes Links
Trading Reference Links
|
Hi there, not sure why this is not working, but you can simplify it
quite a bit as shown below, and maybe then it will work. It does
the same as what I can gather you are trying to do. Just note that
it appears as if you are going long when the CCI falls below its
moving average, which seems quite strange.... To enter long when
the CCI rises above the signal line or moving average, just swap
the long and short singals around.
Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://tsatsaeod.ferra4models.com
http://www.ferra4models.com
Enter long (when cci falls below signal line?):
cross( mov( cci( opt1 ), opt2, E ), cci( opt1 ) )
Enter short (when cci rises above signal line?):
cross( cci( opt1 ), mov( cci( opt1 ), opt2, E ) )
> When( CCI( opt1 ) ,< ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND
> When( Ref( CCI(opt1),-1) ,>= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 ) )
>
> Enter Short:
>
> When( CCI( opt1 ) ,> ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND
> When( Ref( CCI(opt1),-1) ,<= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 )
--- In equismetastock@xxxxxxxxxxxxxxx, "aaapittsburgh"
<aaapittsburgh@xxxx> wrote:
>
>
> I'm new to Metastock and I found a CCI system on the trader.online.pl
> site, but I seem to have a problem with it. For some reason, it only
> gives me long signals, and no short signals. The code is:
>
> Enter Long:
>
> When( CCI( opt1 ) ,< ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND
> When( Ref( CCI(opt1),-1) ,>= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 ) )
>
> Enter Short:
>
> When( CCI( opt1 ) ,> ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND
> When( Ref( CCI(opt1),-1) ,<= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 ) )
>
>
> Optimization Variables:
>
> Opt1:
> Min = 5 Max = 40 Step = 1
>
> Opt2:
> Min = 5 Max = 40 Step = 1
>
> Any help with this would be greatly appreciated.
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|