TD Demand Point - futures io
futures io futures trading



TD Demand Point


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kaywai with 11 posts (1 thanks)
    2. looks_two cory with 3 posts (0 thanks)
    3. looks_3 optntdr13 with 3 posts (0 thanks)
    4. looks_4 Trader.Jon with 3 posts (0 thanks)
    1. trending_up 5,373 views
    2. thumb_up 1 thanks given
    3. group 5 followers
    1. forum 21 posts
    2. attach_file 4 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

TD Demand Point

(login for full post details)
  #1 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Hi,

I'm trying to code a TD Demand Point but not sure how to go about doing so.

A Level 1 TD Demand Point is defined as a low which has a higher low on either side of it and a Level 3 TD Demand Point is defined as a low which has 3 higher lows on each side of it.

So, in the first scenario, Close[1] < Close[2] && Close[1] < Close[0] and
in the second scenario Close[3] is < Close[0], Close[1], Close[2], Close[4], Close[5] and Close[6].

I would like to code it where I can determine the Level and the code does the rest.

Could anyone help?

Regards

Kay Wai

Reply With Quote

Can you help answer these questions
from other members on futures io?
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
Indicators for pair trading MES and M2K
Platforms and Indicators
SimplerOptions
Trading Reviews and Vendors
OFA (Order Flow Analytics) Licence
NinjaTrader
 
 
(login for full post details)
  #3 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,030 since Jun 2009
Thanks: 845 given, 7,894 received


add swing indicator twice, set it to swing(1) and swing(2)

Reply With Quote
 
(login for full post details)
  #4 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

will try that. thanks!

Reply With Quote
 
(login for full post details)
  #5 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Swing is not what I was looking for. Let me explain it further what I am trying to achieve. For example for a DemandPoint Level 1, my code would be something like this:-

if (Close[1] < Close[0] && Close[1] < Close[2])
{
DemandPoint = true;
}

AND for a DemandPoint Level 3

if (Close[3] < Close[0] && Close[3]< Close[1] && Close[3] < Close[2] &&
Close[3] < Close[4] && Close[3] < Close[5] && Close[3] < Close[6])
{
DemandPoint = true;
}

How can I code it in such a way that by altering the DemandPoint Level variable, I am able to obtain other alternative scenarios like DemandPoint Level 5 or DemandPoint Level 6, where the bool DemandPoint is true without having to have type out the if condition in full?

Reply With Quote
 
(login for full post details)
  #6 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,030 since Jun 2009
Thanks: 845 given, 7,894 received

you have been working on this for a whole year. Was you able to code any of demark's setup?

Reply With Quote
 
(login for full post details)
  #7 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

cory, demark's setup is all good now. this is another indicator from TD - TD Lines

Reply With Quote
 
(login for full post details)
  #8 (permalink)
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 183 received


kaywai View Post
Hi,

I'm trying to code a TD Demand Point but not sure how to go about doing so.

A Level 1 TD Demand Point is defined as a low which has a higher low on either side of it and a Level 3 TD Demand Point is defined as a low which has 3 higher lows on each side of it.

So, in the first scenario, Close[1] < Close[2] && Close[1] < Close[0] and
in the second scenario Close[3] is < Close[0], Close[1], Close[2], Close[4], Close[5] and Close[6].

I would like to code it where I can determine the Level and the code does the rest.

Could anyone help?

Regards

Kay Wai

If you want to compare Low[*], then why are you testing Close[*] ??

Jon

Reply With Quote
 
(login for full post details)
  #9 (permalink)
the coin hunter
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
 
cory's Avatar
 
Posts: 6,030 since Jun 2009
Thanks: 845 given, 7,894 received


kaywai View Post
cory, demark's setup is all good now. this is another indicator from TD - TD Lines

you should be able to re-use the code from a working indicator.

Reply With Quote
 
(login for full post details)
  #10 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received


jon, you are correct!. it should be Lows compared with Lows. Thx!

cory, I have been searching in my midst of coding other TD indicators but have not come across anything that will help me determine the points. drawing the initial line should be fine though there are rules there too.

Reply With Quote
 
(login for full post details)
  #11 (permalink)
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 183 received


kaywai View Post
jon, you are correct!. it should be Lows compared with Lows. Thx!

cory, I have been searching in my midst of coding other TD indicators but have not come across anything that will help me determine the points. drawing the initial line should be fine though there are rules there too.

Untested!! As a DataSeries you could have

TDDP1.Set((Low[1] < Low[2] && Low[1] < Low[0])[0]);
TDDP3.Set((Low[3] < Low[0] && Low[3] < Low[1] && Low[3] < Low[2] && Low[3] < Low[4] && Low[3] < Low[5] && Low[3] < Low[6])[0]);

DemandPoint1.Set(0);

if ( TDDP1[0] == true )
{ DemandPoint1.Set(1); }

if ( TDDP1[0] == false )
{ DemandPoint1.Set(-1); }

Reply With Quote
 
(login for full post details)
  #12 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Jon, I came across this code...not sure if it works but it seems more inline with what I'm trying to achieve. Please take a look.

PointA = Point;
PointB = Point;

while (PointA > 0)
{
PointA--;
PointB++;

if (Close[Point] < Close[PointA] && Close[Point] < Close[PointB])
{
if (PointA == 0)
{
DemandPoint = true;
}
else
{
PointA = 0
DemandPoint = false;
}
}
}

Reply With Quote
 
(login for full post details)
  #13 (permalink)
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 183 received


kaywai View Post
Jon, I came across this code...not sure if it works but it seems more inline with what I'm trying to achieve. Please take a look.

PointA = Point;
PointB = Point;

while (PointA > 0)
{
PointA--;
PointB++;

if (Close[Point] < Close[PointA] && Close[Point] < Close[PointB])
{
if (PointA == 0)
{
DemandPoint = true;
}
else
{
PointA = 0
DemandPoint = false;
}
}
}

My gut feeling is that there is a problem ... I dont think you can have both PointA and PointB equal Point ?! I have never seen anything like " Close[Point] " to be able to comment at all ...

I guess you will find out when you add it to some already stable code as a test ..

Jon

Reply With Quote
 
(login for full post details)
  #14 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

if Point is an "int" variable, would that work? let me check it out later tonight.

Reply With Quote
 
(login for full post details)
  #15 (permalink)
Singapore
 
Experience: Intermediate
Platform: NinjaTrader, Sierra Charts
Broker: Thinkorswim, IQFeed
Trading: Options of SPY, IWM, QQQ
 
wccktrader's Avatar
 
Posts: 47 since Nov 2010
Thanks: 54 given, 148 received

Kaywai, if your intention is to visualize the demand/supply points on a chart, esam_jir has posted an indie in the thread "fractal points (tradestation)" over the weekend which may be helpful to you. The demand/supply points that you were referring to are essentially fractal points. I have indicated the demand/supply points in the chart below:

Level 1 Demand Points : Blue triangles
Level 1 Supply Points : Red triangles
Level 2 Demand Points: Green dots
Level 2 Supply Points: Orange dots
Level 3 Demand Points: Green hash
Level 3 Supply Points: Pink hash

Attached Thumbnails
Click image for larger version

Name:	SPY (Daily)  10_7_2010 - 1_27_2011.jpg
Views:	96
Size:	83.0 KB
ID:	29644  
Reply With Quote
 
(login for full post details)
  #16 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Thank you very much wccktrader! It looks like what I am looking for!

Pretty sure I don't understand the code but...

Reply With Quote
 
(login for full post details)
  #17 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Jon, that code I showed you wasn't good but I came up with this (TDPoints). Wccktrader showed me a very interesting code (FractalPoints) which is more efficiently written and certainly more robust. Check it out.

Attached Files
Register to download File Type: zip TDPoints.zip (2.7 KB, 19 views)
Register to download File Type: zip FractalPivot_TradeStation.zip (4.3 KB, 13 views)
Reply With Quote
The following user says Thank You to kaywai for this post:
 
(login for full post details)
  #18 (permalink)
Glyndon, Maryland, USA
 
Experience: Advanced
Platform: TOS
Trading: options
 
Posts: 25 since Sep 2010
Thanks: 6 given, 48 received

Here is correct thinkscript code for TDPoints, hopefully it might help you with Ninja...

Attached Files
Register to download File Type: ts TDPoints_DVRLSTUDY.ts (4.7 KB, 9 views)
Reply With Quote
 
(login for full post details)
  #19 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Thx optntdr13! Any idea how i can open a thinkscript file?

Reply With Quote
 
(login for full post details)
  #20 (permalink)
Glyndon, Maryland, USA
 
Experience: Advanced
Platform: TOS
Trading: options
 
Posts: 25 since Sep 2010
Thanks: 6 given, 48 received

Sure, what I did on my laptop was to associate Windows 7 and .ts files with notepad++. Apparently there exists some type of media file with the same extension though I haven't ever seen a file of this type so I changed the default. Otherwise, just select "open with" and browse until you find a text editor. I would post the code but it's pretty long. I also have code for the lines that I wrote as well. If you would like me to post that as well I am happy to do so. I just figured having the right code instead of most of the garbage TD indicator's out there might help. Please don't share the files outside of people you trust as I don't need the Demark trademark police coming to my house anytime soon

Reply With Quote
 
(login for full post details)
  #21 (permalink)
singapore
 
 
Posts: 131 since Nov 2009
Thanks: 11 given, 7 received

Hi optntdr13,

Thx for that! I've coded it pretty much the same way! BUT I've set the point levels at 1, 2, 3, 5, 8, 13 and 21. If you're using NT7, my code is attached to this trade - TD Demand Points. The TD Supply Points are in that code too.

My next step is TD Lines!!! Could you PM me the TD Lines code? Would hate to see you harassed even though the info is all publicly available. I'd like to take a look at how I can code it on NT7.

I've a ~90% completed code for TD Sequential. The only things I can't figure out is how to cancel the TD Countdowns especially when I want a specific TD Countdown cancelled and how to have multiple TD Risk Lines running concurrently in the same direction. Could you provide me with some direction?

Regards

Kay Wai

Reply With Quote
 
(login for full post details)
  #22 (permalink)
Glyndon, Maryland, USA
 
Experience: Advanced
Platform: TOS
Trading: options
 
Posts: 25 since Sep 2010
Thanks: 6 given, 48 received

If you e-mail me, I have sequential in Ninjatrader and am happy to share what I came up with...daryanlenz@gmail.com

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > TD Demand Point


Last Updated on February 23, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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