Modified Bollinger Bands

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #89090 quote
    Maisam Zaidi
    Participant
    Junior

    Hello Everyone,

    I was wondering if anyone can convert the following code into ProRealTime. The indicator is called Modified Bollinger Bands. The code is from Perry Kaufman’s book (Trading Systems and Methods – 5th Edition) and is in TradeStation Language. I also have attached the original text from the book for the better understanding of the code as everything is explained in more detail. Anyone, who can convert the code into ProRealTime, will be highly appreciated.

    Thank you.

    Regards,
    Maisam

    Indicator Code:

    { TSM Bollinger Modified
    from “Better Bollinger Bands” by Dennis McNicholl, “Futures,” October 1998
    Copyright 2011, P.J.Kaufman. All rights reserved. }

    inputs: period(20), factor(2.0);
    vars: alpha(0), mt(0), ut(0), dt(0), mt2(0), ut2(0), dt2(0), but(0), blt(0);

    { smoothing constant }
    alpha = 2/(period + 1);

    mt = alpha*close + (1 – alpha)*mt;
    ut = alpha*mt + (1 – alpha)*ut;
    dt = ((2 – alpha)*mt – ut)/(1 – alpha);
    mt2 = alpha*absvalue(close – dt) + (1 – alpha)*mt2;
    ut2 = alpha*mt2 + (1 – alpha)*ut2;
    dt2 = ((2 – alpha)*mt2 – ut2)/(1 – alpha);
    but = dt + factor*dt2;
    blt = dt – factor*dt2;

    plot1(dt,”center”);
    plot2(but,”upper”);
    plot3(blt,”lower”);

    Modified-Bollinger-Bands-2.jpg Modified-Bollinger-Bands-2.jpg Modified-Bollinger-Bands-3.jpg Modified-Bollinger-Bands-3.jpg
    #89213 quote
    Nicolas
    Keymaster
    Master

    It is called the Better Bollinger Bands, available here: Better Bollinger Bands

    #89283 quote
    Maisam Zaidi
    Participant
    Junior

    @Nicolas

    Thanks very much.

    Regards,
    Maisam

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Modified Bollinger Bands


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Maisam Zaidi @maisam Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Maisam Zaidi
7 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/19/2019
Status: Active
Attachments: 2 files
Logo Logo
Loading...