Deleting EMAs plotted via afl

#1
Hi,

I'm looking for the AFL function which can be used to remove already plotted ema's on the chart.

I basically want to have two scripts (ma.afl and no-ma.afl).

ma.afl when drag dropped on the chart will plot a couple of EMAs on the chart no-ma.afl when drag dropped will remove the EMAs plotted on the chart when ma.afl was dropped.

Any help along these lines is highly appreciated.
--
Regards,
Ike
 

amitrandive

Well-Known Member
#2
Hi,

I'm looking for the AFL function which can be used to remove already plotted ema's on the chart.

I basically want to have two scripts (ma.afl and no-ma.afl).

ma.afl when drag dropped on the chart will plot a couple of EMAs on the chart no-ma.afl when drag dropped will remove the EMAs plotted on the chart when ma.afl was dropped.

Any help along these lines is highly appreciated.
--
Regards,
Ike
Select "No Draw " option from the parameters of a basic Moving average formula.
 
#3
Select "No Draw " option from the parameters of a basic Moving average formula.
Thanks for mentioning this. But is this possible via an afl script.

My basic question is how do I obtain reference to the existing EMA on the chart.

Thanks.
--
Regards,
Ike
 

amitrandive

Well-Known Member
#4
Thanks for mentioning this. But is this possible via an afl script.

My basic question is how do I obtain reference to the existing EMA on the chart.

Thanks.
--
Regards,
Ike
For having a non MA AFL ,you can use a plain price chart.Cannot understand your request.Post a screen shot is possible.

If it is an existing AFL system, you can delete the MA's from that AFL and save it by another name.

The same MA AFL will work as a non-MA AFL.
 

vijkris

Learner and Follower
#5
there are so many sheets in amibroker. u can always use another sheet for non ma afl.
drag and drop adds sections in the afl. so it is not practical to keep on dragging afls. instead u can use param function to toggle between ma and no ma.
 
#6
Hi,

Ok. Got It. I have created an afl with all the necessary EMAs as follows.

Code:
_SECTION_BEGIN("all-ema");
EMA_050 = Plot(EMA(C, 50), "ema-050", ColorRGB(64, 64, 64), styleLine, Null, Null, 0, 0, 1);
EMA_100 = Plot(EMA(C, 100), "ema-100", ColorRGB(128, 128, 128), styleLine, Null, Null, 0, 0, 1);
EMA_200 = Plot(EMA(C, 200), "ema-200", ColorRGB(192, 192, 192), styleLine, Null, Null, 0, 0, 1);
_SECTION_END();
I simply delete all-ema from the menu and get rid of the emas.

One simple question though, is it possible to move this to a specific layer in the above afl ? I can then turn off the layer visibility and view and hide everything under the afl.

Thanks for all the suggestions and help. :thanx:
 

mastermind007

Well-Known Member
#7
Hi,

Ok. Got It. I have created an afl with all the necessary EMAs as follows.

Code:
_SECTION_BEGIN("all-ema");
EMA_050 = Plot(EMA(C, 50), "ema-050", ColorRGB(64, 64, 64), styleLine, Null, Null, 0, 0, 1);
EMA_100 = Plot(EMA(C, 100), "ema-100", ColorRGB(128, 128, 128), styleLine, Null, Null, 0, 0, 1);
EMA_200 = Plot(EMA(C, 200), "ema-200", ColorRGB(192, 192, 192), styleLine, Null, Null, 0, 0, 1);
_SECTION_END();
I simply delete all-ema from the menu and get rid of the emas.

One simple question though, is it possible to move this to a specific layer in the above afl ? I can then turn off the layer visibility and view and hide everything under the afl.

Thanks for all the suggestions and help. :thanx:
Consult
Using layers

Layers are like pieces of transparent plastic. You can put drawings on them. Layers can be made visible or invisible. This allows to show/hide drawings placed on given layer without affecting the drawings placed on other layers.

How to work with layers.

First of all make sure that Workspace window is visible (Window->Layers)

Then switch to "Layers" tab. Here you can see the list of pre-defined layers.

The checkboxes on the left side of each layer control layer visibility. If checkbox is marked than given layer is visible, if it is unmarked - the layer is invisible. Initially first five layers will be "locked" to intervals.
These built-in layers are:

Default layer - always visible
Intraday layer - visible only when viewing intraday charts
Daily layer - visible only when viewing daily charts
Weekly layer - visible only when viewing weekly charts
Monthly layer - visible only when viewing monthly charts

A locked layer changes its visibility automatically when interval changes and you can not change its visibility by clicking on the left-side checkbox.

The remaining layers are not locked and they can be shown/hidden freely by marking the checkbox.

To draw a study in a given layer simply
a) SELECT the layer first (click on name to highlight it)
b) DRAW the study as usual

As long you select the other layer all drawings will be placed on selected layer. After drawing a study you can assign it to any other layer via object properties box.

Context menu

If you click on layer name with right mouse button you will see the context menu containing the following options:

Add layer
Remove layer
Show all layers
Hide all layers
Toggle
Unlock built-in layers
Lock built-in layers
Properties.

Add/Remove layer are self-explanatory. Please note that you can not remove first 5 (built-in) layers

Show all/Hide all - shows and hides all NOT LOCKED layers
Toggle - toggles visibility of all NOT LOCKED layers

Unlock/Lock built-in layers - allows you to unlock/lock 5 first (built-in) layers. Once layer is unlocked its visibility does not change automatically when interval changes and you can show/hide it manually.

Properties - this launches properties box that allows you to rename layer and decide if given layer should or should not be locked to interval displayed.
If you mark "Lock visibility to interval" box the layer will show/hide automatically depending on what interval is
currently displayed. You can define visibility for each layer using "Interval" combo and "Show/hide automatically" buttons. Note that there is a *separate* visibility setting for EACH interval. The layer properties box ALWAYS shows "monthly" interval at start but this is just a startup condition you just switch to particular interval
and modify visibility. To setup locked layer completely you have to set visibility for every layer listed in the "Interval" combo-box. Simply select the interval and choose if layer should be shown or hidden for this interval, select next interval and again choose show or hide, select next and so on...until you define visibility for all intervals.
 
Last edited:

Similar threads