tweezer - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Started:August 22nd, 2011 (03:38 PM) by abiritus Views / Replies:523 / 3
Last Reply:August 22nd, 2011 (07:53 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread


Old August 22nd, 2011, 03:38 PM   #1 (permalink)
Trading Apprentice
Futures Experience: Beginner
Platform: ninja trader
Broker/Data: zen-fire
Favorite Futures: futures
abiritus's Avatar
Posts: 4 since Dec 2009
Thanks: 4 given, 1 received


I would like to draw a line betweene each tweezer(two same hight bars or two same low bars )
the programe :
// Check for Tweezer pattern
protected override void Initialize()
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;

protected override void OnBarUpdate()
if (CurrentBar < 2) return;
if (High[0] == High[1])
DrawLine("tag1",true, 2, High[0], 0, High[1], Color.Magenta, DashStyle.Solid, 5);
if (Low[0] == Low[1])
DrawLine("tag1",true, 2, Low[0], 0, Low[1], Color.Magenta, DashStyle.Solid, 5);
the result: only one line was drawn and i want that all two same higts and each two same lowers bars will be drawn in the chart
can someone helps ?

Last edited by abiritus; August 28th, 2011 at 11:20 AM.
Reply With Quote

Old August 22nd, 2011, 03:38 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old August 22nd, 2011, 03:52 PM   #3 (permalink)
Administrator: Retired Backtester
Rennes France
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
sam028's Avatar
Posts: 3,183 since Jun 2009
Thanks: 3,427 given, 3,726 received

Add an unique tag for each DrawLine, not a simple "tag1".

Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:

Old August 22nd, 2011, 07:53 PM   #4 (permalink)
Elite Member
Taipei Taiwan
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Optimus
Favorite Futures: TW
Posts: 691 since Jun 2009
Thanks: 428 given, 432 received

Something like
"Tweezer" + CurrentBar
for the tag.

Math. A gateway drug to reality.
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > tweezer

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

All times are GMT -4. The time now is 12:24 PM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-23 in 0.08 seconds with 19 queries on phoenix via your IP