Articles & Videos & Calculators                 Product guide             Trading IQ Game with great prizes                  Support HomeSite Map - Testimonials

 

Back to PLA Dynamical GOLD for Tradestation page

 

 

Using PLA Dynamical GOLD to smooth indicators and create functions and signals in MultiCharts power editor

 

 

Precision Trading Systems has provided two methods to do this. Please read carefully to avoid errors.

Method 1.

If you are doing something simple, then this is the best choice for you.

In the inputs settings you can see PRICE. The default value of price is CLOSE. However this can simply be changed to represent the indicator you want to smooth with PLA Dynamical GOLD moving average.

Example 1. Smoothing RSI

Plot PLA Dynamical on the chart and select sub graph 2 from the properties tab.

In the inputs box click on Price and type in

RSI(CLOSE, 30) then click ok

The plot in sub graph 2 will then be a smoothed RSI of length 30 which reads the closing price.  You can then modify PLA Dynamical lengths, speed and overshoot functions to fit your requirements. If you want to reduce RSI length to 10, and read from the median price then simple type in

RSI(MEDIANPRICE, 10)  then click ok

Example 1. Smoothing CCI

Plot PLA Dynamical on the chart and select sub graph 2 from the properties tab.

In the inputs box click on Price and type in

CCI(30) then click ok

 

Method 2

If you are doing something more complex such as creating a signal or function or indicator using PLA Dynamical GOLD then this method is correct.

Example of creating an indicator with two plot from PLA Dynamical GOLD

PLA Dynamical GOLD has the following syntax to use for programming.

PLA_D_GOLD_Func_v1.00(length, price, speed, overshoot,anti_reverse,anti_rev_per);

All the parts must be assigned a value for it to work correctly.

 

Below is an example piece of code that is used to smooth 2 different length RSI indicators with PLA Dynamical GOLD showing in 1 window.

In power language editor, click on file new indicator , type in a name EG My_smooth_PLA_RSI and copy the code below into the open window and click compile. It will then be shown in your indicator list

 

Inputs: Length(40),  speed(40), overshoot(1), anti_reverse(1),anti_rev_per(0.01);

vars: smoothpla1(0),smoothpla2(0),indicator1(0),indicator2(0);

indicator1 = rsi(c,20);
indicator2= rsi(c,50);


smoothpla1= PLA_D_GOLD_Func_v1.00(length,indicator1,speed,overshoot,anti_reverse,anti_rev_per);

smoothpla2= PLA_D_GOLD_Func_v1.00(length,indicator2,speed,overshoot,anti_reverse,anti_rev_per);


PLOT1(smoothpla1,"TEST");
PLOT2(smoothpla2,"TEST2");
 

The variables called indicator1 and indicator2 can be changed to suit what you require.

In the example above you can notice the "price" input has been removed and replayed in the syntax by "indicator1"

smoothpla1= PLA_D_GOLD_Func_v1.00(length,indicator1,speed,overshoot,anti_reverse,anti_rev_per);

The important thing is to get the variables in the correct order. 

 

Sample code to use PLA Dynamical GOLD as a function

Functions can be used to be "called" by other indicators, signals or other functions.

In the example I will make PLA Dynamical GOLD into a binary trend function which you can call. If the indicator is rising it will return +1 and if it is falling it will return -1 ( this is to indicate a major trend )

Click on file new function, numeric and name it TEST_PLA_TREND

Copy the code below and click compile. You have now created the function.

 

Inputs: Length(Numeric),PRICE(Numeric),speed(Numeric), overshoot(Numeric), anti_reverse(Numeric),anti_rev_per(Numeric);

vars: PLA(0);

pla= PLA_D_GOLD_Func_v1.00(length,price,speed,overshoot,anti_reverse,anti_rev_per);

if pla > pla[1] then TEST_PLA_TREND =1;
if pla < pla[1] then TEST_PLA_TREND =-1;

 

Now we can proceed to make a custom indicator that will call from this function

Click on file new Indicator and name it TEST_PLA_TREND

Copy the code below and click compile. You have now created the indicator that measures trend as +1 or -1.

 

Inputs: Length(100),Price(c),speed(40), overshoot(1), anti_reverse(1),anti_rev_per(0.01);

vars: PLA_TREND(0);

PLA_TREND= TEST_PLA_TREND(LENGTH,PRICE,SPEED,OVERSHOOT,ANTI_REVERSE,ANTI_REV_PER);



PLOT1(PLA_TREND,"PLA_TREND");
Now we can proceed to plot the indicator on the chart. It will appear in your indicator list.

Choose subgraph 2 when you add it to the chart.

Uptrend is defined as +1 and downtrend is defined as -1

Now we can make a simple strategy signal which uses this is a trend filter. We will use length 100 to signify a major trend and the buy signals will be given from length 30 PLA Dynamical GOLD rising compared to the value of the previous bar.

Click on file new signal , Type the name for it as  PLA_TREND_FILTER

Copy the code below and paste it into the open window and click compile.

 

Inputs: Major_Trend_length(100), Minor_trend_length(30),Price(c),speed(40), overshoot(1), anti_reverse(1),anti_rev_per(0.01);

vars: PLA_MAJOR_TREND(0), PLA_MINOR_TREND(0);

// code below is called from the function we just made

PLA_MAJOR_TREND=
TEST_PLA_TREND(major_trend_length,close,{speed}50,{overshoot}0,0,0);

//above code will return either +1 or -1 or 0 if the data is not full up yet

// code below is calling pla dynamical gold and is using the minor trend length


PLA_MINOR_TREND=
pla_d_gold_func_v1.00(minor_trend_length,PRICE,SPEED,OVERSHOOT,ANTI_REVERSE,ANTI_REV_PER);

// long entry and long exit code below

If PLA_MAJOR_TREND = 1 and PLA_MINOR_TREND > PLA_MINOR_TREND[1] then buy next bar at market;
If PLA_MAJOR_TREND = 1 and PLA_MINOR_TREND < PLA_MINOR_TREND[1] then sell next bar at market;

// short entry and short exit code below
If PLA_MAJOR_TREND = -1 and PLA_MINOR_TREND < PLA_MINOR_TREND[1] then sellshort next bar at market;
If PLA_MAJOR_TREND = -1 and PLA_MINOR_TREND > PLA_MINOR_TREND[1] then buytocover next bar at market;

 

Now you can add the signal to the chart to see how it works.

Notice in the variable TEST_PLA_TREND I have fixed the variables for speed to 50 and overshoot to 0. If you want to change them you can type different values into those place.

 

You can find more examples of using easy language code on this page

 

Back to PLA Dynamical GOLD for Tradestation page

 

 

Search Precision Trading Systems 

 

 

site search by freefind advanced

Member log in

If your question is about the Trading IQ Game, all the answers are on the FAQ page provided

Did not find what you wanted?

Drop me an email

Contact Roger  PrecisionTS@gmail.com

 

 

Precision Trading Systems is provider of the following

 Introduction

 

  Precision Trading Systems is partnered with NinjaTrader & MultiCharts.

 

  Systems and Indicators for Tradestation, NinjaTrader and MultiCharts.

 

  Top quality paid & FREE trading systems and indicators for most platforms

 

  Members can receive some paid products completely FREE

 

  Members can receive FREE trading and betting capital on sign up

 

  UK Spread betting guide showing how I made a 25,543% return in 12 years

 

  Elite traders forum for sharing tips on how to use these products for best effect.

 

  Free to play Trading IQ Game with generous prizes from our sponsors.

 

 

 

 

Precision Trading Systems is partnered with

 
  • Products are provided for both these platforms.
  • These partners also sponsor the Trading IQ Game
  • Both these trading platforms are excellent