[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Switching MA on/off - - Help with code please



PureBytes Links

Trading Reference Links

Here are two ways I use.  One is just to simply change the parameter style to “hidden” and the second is to use a ParamList with an if statement.

 

#####################################

1st Way

#####################################

 

Just create a ParamStyle so you can use parameters to Hide/Unhide it.  If you want to default to hidden, use stylehidden.

In the below example you would change “Middle Band Style” in Parameters to hidden if you didn’t want to see it.

 

Plot( MA( C, 21 ), "", ParamColor( "Middle Band Color", colorBlue ), ParamStyle("Middle Band Style", styleThick | styleNoLabel));

 

 

#####################################

    2nd Way

#####################################

 

 

_SECTION_BEGIN("Adjustible Line Thickness");

adjust = ParamList("Use Flakey Line Adjuster?", "Let Me See How Broken It Is|No WAY",1);

if(adjust == "Let Me See How Broken It Is") { // Use the Adjustible Lines

 

// Will plot only if TRUE

 

} else { // Don't use Adjustible Lines

 

//Will plot only if FALSE

 

}

 

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of OptionTed
Sent: Wednesday, November 14, 2007 7:52 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Switching MA on/off - - Help with code please

 

 Hello

I am really stuck with this code. It will not work!!

All I want to do is switch the MA in or out.

I will apreciate some ideas please

Thanks

_SECTION_BEGIN(" MA10 ");

MA10 = EMA(C, 10);

MA10 on/off", 1,1,2,1);

MAon = IIf(>1, True, False );

IIf(MAon,Plot(MA10,"",colorRed, styleLine ), Null );

_SECTION_END();

Plot(C, "", colorBlue, 64);

 

 


I am using the free version of SPAMfighter for private users.
It has removed 344 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___