Using Seetu to Create New Indicators?

Hello, I’m new to collective2 and have a couple questions regarding Seetu.

I’ve using another platform where I create and use my own indicators. Can you create custom indicators with Seetu?

Also this looks to be a hosted platform. How are customer indicators and trading strategies kept private and secure?


You can use your own functions.

Here is an example ( function MyMACDSig ):


function MyMACDSig()
  // Prepare your data:
  myData = CalcMACDSignal(fast=18, slow=39, signal=13);
  //  return them:
  return myData;

// Call your function:
mySignal = MyMACDSig();

doPlot( mySignal,"MyMACDSig",colorRed);

Your code is indeed private only to you.
We do not release it or share it.
It is not currently stored encrypted, but it is stored in a secure database on a secure server that is not shared.

This example really isn’t creating a new type of indicator; its really creating a function around an existing indicator. What I am looking for is to build true custom indicators which require processing at the bar level.

In weathlab, I can perform sudo-windowing by using a loop that goes back to check previous bars values as we iterate through the symbol series. This essentially allows me to build day-by-day indicator at bar level.

For example, if I wanted to create my own 10-day moving average function I could use something like this… (abbreviated for simplicity).

dataseries myAvg = new dataseries();
for (int bar = startbar; bar < lastbar; bar++)
     double avg = 0;
     for (int i = bar, i > bar-10, bar--)
        avg += Close[i];  
     myAvg[bar] = avg/10; 

How would you do this in Seetu without using your existing moving average function? This is the type of capability that we need to create true game changing trade systems.’

Additionally, we need the capability of:

  • External Values:
    • External Symbols (same scale)
    • Stock Symbols fundamentals (Net Income, Net Profit, Gross Sales, shares issued, shares outstanding, etc…)
  • Change Scale and Pull Up Scale (generate a up-scale data from down-scale values - eq. creating a daily indicator from intraday values)


You can do almost the same (run following in Exploration):


function myAvg()
  // What is "startbar" in Wealth-Lab?
  // We need to start at 10 at least to avoid an infinite inner cycle.
  startbar = 10;
  result_DataSeries = 0;
  for( bar = startbar; bar < BarCount; bar++ ) 
     avg_tmp = 0;
     for (i = bar; i > bar-10; i--)
        avg_tmp += Close[i];  
     result_DataSeries[bar] = avg_tmp / 10; 
  return result_DataSeries;

x = myAvg();

// I undestand it is just an example, 
// but the same results can be obtained without errors using built-in functions:
y = MA(Close,10);
z = Sum(Close,10) / 10;

Filter = 1;


Generally, “for” loop should be avoided.
First, it is very slow, second, it is error prone.

For example: if we start outer cycle from zero (very likely), then the inner cycle is infinite.
Also, you have probably an error in the inner cycle: for (int i = bar, i > bar-10, bar–)
I believe it should be: for (int i = bar, i > bar-10, i–)

So be very carefull using “for” cycles. It is easy to make errors…

Other features you mentioned are planned, but we have no deadlines.

Thanks, I’m glad we can get down to detail level.

Yes, I had an error in my sample code. :slight_smile: Startbar is more conceptual and just refers to first bar in the defined testing period.

I’m assuming there isn’t a shortcut for producing a time-weighted averaging - such as changing the inner formula with the following:

avg_tmp += Close[i]/i;

Perhaps one of CalcEMA, CalcDEMA, CalcTEMA, MAAdaptive averages ?