NexusFi: Find Your Edge


Home Menu

 





Parallel Lines


Discussion in NinjaTrader

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




 
Search this Thread

Parallel Lines

  #1 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,747

How can I draw parallel extended lines with NinjaScript?

I've checked the NT forum and not much help was found there.

Thanks

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863



DavidHP View Post
How can I draw parallel extended lines with NinjaScript?

I've checked the NT forum and not much help was found there.

Thanks

You can either use the :

DrawTrendChannel("tag1", true, 10, Low[10], 0, High[0], 10, High[10] + 5 * TickSize);

Or you calculate the Angle yourself and draw individual lines that are parallel

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,747


rleplae View Post
You can either use the :

DrawTrendChannel("tag1", true, 10, Low[10], 0, High[0], 10, High[10] + 5 * TickSize);

Or you calculate the Angle yourself and draw individual lines that are parallel

Thanks for the suggestion.
I would rather draw the lines myself but the problem is calculating the angle.

I tried using the DrawTrendChannel method and the issue is that method does not allow the lines to be colored differently.
I also tried the DrawAndrewsPitchfork and the line color can be changed but only as a group not individually (Top/bottom)

Drawing angles seems to not work the ways I have tried.
I have no issue drawing a trend line from tops or from bottoms but the angle calculating is not something I have been successful at accomplishing.

Here is what I tried but the lines are not parallel.

 
Code
DrawRay("rayLow", true, CurrentBar-prevlobar, prevlo, CurrentBar-lastlobar, lastlo, Color.Green, DashStyle, 4);

DrawRay("rayHigh", true, CurrentBar-prevhibar, prevhi, CurrentBar-lastlobar,(lastlo+(prevhi-prevlo)), Color.Red, DashStyle, 4);
Thank you for your input.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Started this thread Reply With Quote
  #5 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


DavidHP View Post
Thanks for the suggestion.
I would rather draw the lines myself but the problem is calculating the angle.

I tried using the DrawTrendChannel method and the issue is that method does not allow the lines to be colored differently.
I also tried the DrawAndrewsPitchfork and the line color can be changed but only as a group not individually (Top/bottom)

Drawing angles seems to not work the ways I have tried.
I have no issue drawing a trend line from tops or from bottoms but the angle calculating is not something I have been successful at accomplishing.

Here is what I tried but the lines are not parallel.

 
Code
DrawRay("rayLow", true, CurrentBar-prevlobar, prevlo, CurrentBar-lastlobar, lastlo, Color.Green, DashStyle, 4);

DrawRay("rayHigh", true, CurrentBar-prevhibar, prevhi, CurrentBar-lastlobar,(lastlo+(prevhi-prevlo)), Color.Red, DashStyle, 4);
Thank you for your input.

TGIF

This is basis trigonometry
explained by a beautiful lady always soften to digest


Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #6 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,612 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,747

Thanks for the link I will watch it when I get in this afternoon.

None of this is critical.
The line colors are simply cosmetic and the TrendChannel or Andrews is sufficient.

However, when I tried to do it myself I found I did not understand the concept and that is always a challenge.
So I will learn the concept and be able to do it.

I figured it was a little complicated since everyone that asked on the NT forum was given vague answers and told it was an advanced concept. That type of response always makes me want to find out more. Kind of like saying "this is too difficult for you to understand" Hmm.

Thanks again.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Started this thread Reply With Quote




Last Updated on August 18, 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