MAD & MAU

A forum for all EdgeRater users

Moderator: Chris White

zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

MAD & MAU

Post by zztopband »

I am trying to add my script for emad and emau (exponential down and up).

1. Bring up MAD under system scan.
2. In the event only add e in front of ma (for exponential moving average) ie. ema
3. Not changing anything else, I save as eMAD, which should add to my scripts...it does not
I get a compilation errors:
Identifier expected
}expected
expected class, delegate, enum, interface, or struct
expected class, delegate, enum, interface, or struct
expected class, delegate, enum, interface, or struct
expected class, delegate, enum, interface, or struct
Identifier expected
Expected class, delegate, enum, interface, or struct
A namespace cannot directly contain members such as fields or methods..

Please Help,
Thanks, Rick
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: MAD & MAU

Post by Chris White »

Hi Rick,

Can you post the exact contents of your script please and I will compile it over here. If that works then I will ask you to send me your copy of "myscripts.xml" but only after we take this first step.

Thanks,
Chris.
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Re: MAD & MAU

Post by zztopband »

chart script : Event:Cross(eMA(C, SlowPeriod),eMA(C,FastPeriod));
parameters: Name Type Default Min Max
FastPeriod Double 22 1 1000
SlowPeriod Double 50 1 1000

Thanks, Riick
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: MAD & MAU

Post by Chris White »

Hi Rick,

The script looks good and compiles fine. The problem must be in your 'MyScripts.xml' file. Could you post that to me in an email and I will take a look and fix it for you.

Chris.
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Re: MAD & MAU

Post by zztopband »

not sure what nor how to get myscripts.xml file

Rick
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: MAD & MAU

Post by Chris White »

You will find it on your file system in the following folder:
{Documents}\EdgeRater\Chart Scripts

Just attache the MyScripts.xml file to an email and send it to me.

Chris.
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Re: MAD & MAU

Post by zztopband »

Sent to your email twice over last 2 weeks...hopefully u will receive this, tried to send as attachment but failed

<?xml version="1.0" encoding="UTF-8"?>
<Namespace Version="1.0.0.5" Name="FML" xmlns:Formula="http://www.edgerater.com"><Description>This file can be used for adding custom indicators and scans. It will not be overwritten during updates to EdgeRater</Description><Namespaces><Namespace Version="" Name="My"><Description>This namespace denotes indicators and scans that have been added by you. This is a good place to add your own custom indicators and scans.</Description><Namespaces><Namespace Version="" Name="My Indicators"><Description>Add indicator scripts under this namespace to keep them organized. Right-click on the namespace node to add a script.</Description><Namespaces/><Programs><Program Name="TestIndicator"><FullName>A test indicator</FullName><Description>Modify this script or add a new one</Description><Code>0;</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params/></Program></Programs><GroupOnly>true</GroupOnly></Namespace><Namespace Version="" Name="My Scans"><Description>Add scan scripts under this namespace to keep them organized. Right-click on the namespace node to add a script.</Description><Namespaces/><Programs><Program Name="TestScan"><FullName>A test scan</FullName><Description>Modify this script or add a new one</Description><Code>0;</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params/></Program></Programs><GroupOnly>true</GroupOnly></Namespace></Namespaces><Programs><Program Name="13xd26"><FullName/><Description/><Code>Event:Cross(EMA(C, 26),EMA(C, 13));</Code><Params/></Program><Program Name="EMA22CD"><FullName>Close cross down through EMA(22)</FullName><Description>An event is generated whenever the Close price crosses down through the 22 period EMA</Description><Code>Event: Cross(EMA(C, 22), C);</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params/></Program><Program Name="My13xd26"><FullName/><Description/><Code>Event:Cross(EMA(C, 26),EMA(C, 13));</Code><Params/></Program><Program Name="MAD"><FullName>Moving Average Cross Down</FullName><Description>An event is generated whenever the fast moving average crosses down through the slow moving average.</Description><Code>Event:Cross(MA(C, SlowPeriod),MA(C,FastPeriod));</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params><FormulaParam Name="FastPeriod" ParamType="double" MaxValue="1000" MinValue="1" DefaultValue="22"/><FormulaParam Name="SlowPeriod" ParamType="double" MaxValue="1000" MinValue="1" DefaultValue="50"/></Params></Program><Program Name="EMA22CDEMA50"><FullName>22 period EMA Cross Down through 50 EMA</FullName><Description>An event is generated whenever the 22 period EMA crosses down through the 50 period EMA</Description><Code>Event:Cross(EMA(C, 26),EMA(C, 13));</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params/></Program><Program Name="Emad"><FullName>Moving Average Cross Down</FullName><Description>An event is generated whenever the fast moving average crosses down through the slow moving average.</Description><Code>Event:Cross(eMA(C, SlowPeriod),eMA(C,FastPeriod));</Code><DisabledCycle Repeat="0"><WeekAdjust>0</WeekAdjust></DisabledCycle><Params><FormulaParam Name="FastPeriod" ParamType="double" MaxValue="1000" MinValue="1" DefaultValue="22"/><FormulaParam Name="SlowPeriod" ParamType="double" MaxValue="1000" MinValue="1" DefaultValue="50"/></Params></Program></Programs><GroupOnly>false</GroupOnly></Namespace></Namespaces><Programs/><GroupOnly>false</GroupOnly></Namespace>
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: MAD & MAU

Post by Chris White »

I found the problem: One of the scripts had an invalid name. It was called 13xd26. Scripts cannot start with a number. I have modified the name in the attached file and so if you just copy this to your scripts folder, overwriting your existing file it should work. Note the the attachment is a zip file and so you need to unzip it in order to get the MyScripts.xml file from it. The way to attach files to this forum is to zip them first.
MyScripts.zip
(1.03 KiB) Downloaded 890 times
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Re: MAD & MAU

Post by zztopband »

Thanks!
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Re: MAD & MAU

Post by zztopband »

oops, not working getting a sap error, sent report
Can I just re-install the program?
Post Reply