NexusFi: Find Your Edge


Home Menu

 





tweezer


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one traderwerks with 1 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 sam028 with 1 posts (1 thanks)
    4. looks_4 abiritus with 1 posts (0 thanks)
    1. trending_up 1,443 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

tweezer

  #1 (permalink)
abiritus
israel
 
Posts: 4 since Dec 2009
Thanks Given: 4
Thanks Received: 1

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 ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
Quantum physics & Trading dynamics
The Elite Circle
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


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

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 traderwerks   is a Vendor
 
Posts: 692 since Jun 2009
Thanks Given: 436
Thanks Received: 465

Something like
 
Code
"Tweezer" + CurrentBar
for the tag.

Math. A gateway drug to reality.
Reply With Quote




Last Updated on August 22, 2011


© 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