NexusFi: Find Your Edge


Home Menu

 





Help with TOS lbr indictator


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,793 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Help with TOS lbr indictator

  #1 (permalink)
 subterfuge 
uk
 
Experience: Intermediate
Platform: ninja
Broker: amp
Trading: ES
Posts: 179 since Aug 2009

Hi.
Recently downloaded TOS to play around with.

I see that it actually comes with LBR 3/10 indicator as standard.

I have this indicator on my NT7 platform, but with the NT7 version, it draws these 'momentum dots' that I sometimes use when playing a breakout trade in the early part of the day

I'm wondering it someone could create a Thinkorswim version with the dots for me.

I'm assuming it would just take a few seconds as the indicator is already in thinkorswim and I just want the dots added.

I know NOTHING about programming, but I've attaced the NT7 code, and i've emboldened the part which I assume is where the dots come from:

/// <summary>
/// LBR:3/10 Oscillator
/// </summary>
[Description("LBR:3/10 Oscillator")]
[Gui.Design.DisplayName("LBR310")]
public class LBR310 : Indicator
{
#region Variables
// Wizard generated variables
private int fast = 3; // Default setting for Fast
private int slow = 10; // Default setting for Slow
private int longLine = 16; // Default setting for LongLine
private int MoMoPeriod = 40; //Look for momentum highs
private int BarHiLo = 20; //Look for price highs
private int BarLookback = 3; //Period in which the BarHigh needs to have occurred
private DataSeries diff;
private DataSeries avg;
// User defined variables (add any user defined variables below)
#endregion

/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.DarkOrange, PlotStyle.Line, "OscLine"));
Add(new Plot(Color.CornflowerBlue, PlotStyle.Bar, "OscBarUP"));
Add(new Plot(Color.Maroon, PlotStyle.Bar, "OscBarDn"));
Add(new Plot(Color.Lime, PlotStyle.Line, "HPLineUp"));
Add(new Plot(Color.DarkViolet, PlotStyle.Line, "HPLineDn"));
Add(new Line(Color.LightGray, 0, "ZeroLine"));

diff = new DataSeries(this);
avg = new DataSeries(this);

CalculateOnBarClose = false;
DrawOnPricePanel = false;
Overlay = false;
PriceTypeSupported = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.

double FastAvg = SMA(Close, fast)[0];
double SlowAvg = SMA(Close, slow)[0];

double Difference = (FastAvg - SlowAvg) / TickSize;

diff.Set((FastAvg - SlowAvg) / TickSize);

double Average = SMA(diff, longLine)[0];

avg.Set(SMA(diff, longLine)[0]);

OscLinePlot.Set(Difference);
Print(High + " " + CurrentBar);
if (Rising(diff))
OscBarUpPlot.Set(Difference);
else
OscBarDnPlot.Set(Difference);

if ((HighestBar(diff, MoMoPeriod) == 0 && HighestBar(High, BarHiLo) <= BarLookback) || (LowestBar(diff, MoMoPeriod) == 0 && LowestBar(Low, BarHiLo) <= BarLookback))
// DrawDot("Up Dot" + CurrentBar, 0, Difference, Color.Lime);
DrawDot("Up Dot" + CurrentBar, true, 0, Difference, Color.Lime);


if (Rising(avg))
{
HPLinePlotUp.Set(1, avg[1]);
HPLinePlotUp.Set(Average);
}
else if (Falling(avg))


{
HPLinePlotDn.Set(1, avg[1]);
HPLinePlotDn.Set(Average);

----



thanks for any help

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Quantum physics & Trading dynamics
The Elite Circle
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #2 (permalink)
 subterfuge 
uk
 
Experience: Intermediate
Platform: ninja
Broker: amp
Trading: ES
Posts: 179 since Aug 2009

*silence*

I'm assuming this is much more complicated that I suspected.

Started this thread Reply With Quote
  #3 (permalink)
 Mightynorsman 
Albany, New York, USA & sometimes Central Florida
 
Experience: Intermediate
Platform: Tradovate+Jigsaw, TOS
Broker: Tradovate/CQG, TOS/Pony Express
Trading: Energies, Indexes, Grains
Posts: 160 since Mar 2016
Thanks Given: 547
Thanks Received: 361


Did you ever get something like this ?

Reply With Quote




Last Updated on July 23, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts