NexusFi: Find Your Edge


Home Menu

 





Arrows won't print to chart!


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one HealthWealthTrade with 4 posts (0 thanks)
    2. looks_two TheWizard with 2 posts (2 thanks)
    3. looks_3 cory with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,561 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 2 attachments




 
Search this Thread

Arrows won't print to chart!

  #1 (permalink)
 HealthWealthTrade 
San Diego
 
Experience: Advanced
Platform: NinjaTrader, ThinkorSwim
Trading: ES S&P 500
Posts: 35 since Jan 2015
Thanks Given: 10
Thanks Received: 22

Hey guys, I need help with some programming in NinjaScript 7. I tried to post on their support site but i couldn't register; so i came here.

This is the code:
IArrowDown arrow = DrawArrowDown("MyArrowDown2",true, 0, High[0] + TickSize, Color.Red);

I've also tried without the IArrowDown and the = sign in the front and neither worked.

It does not print an arrow on the screen no matter what i do....also this code is in the onBarUpdate() function.

Thanks!,
HealthWealthTrade

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
22 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



HealthWealthTrade View Post
Hey guys, I need help with some programming in NinjaScript 7. I tried to post on their support site but i couldn't register; so i came here.

This is the code:
IArrowDown arrow = DrawArrowDown("MyArrowDown2",true, 0, High[0] + TickSize, Color.Red);

I've also tried without the IArrowDown and the = sign in the front and neither worked.

It does not print an arrow on the screen no matter what i do....also this code is in the onBarUpdate() function.

Thanks!,
HealthWealthTrade

I copy ninja ema code, copy your code and I see an arrow.
why not just use drawarrow using another part of the code is too confusing;
...
protected override void OnBarUpdate()
{
// IArrowDown arrow =
DrawArrowDown("MyArrowDown2",true, 0, High[0] + TickSize, Color.Red);
Value.Set(CurrentBar == 0 ? Input[0] : Input[0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
}

...

Attached Thumbnails
Click image for larger version

Name:	ES 06-18 (5 Min)  3_29_2018.jpg
Views:	170
Size:	35.0 KB
ID:	248176  
Attached Files
Elite Membership required to download: EMA2.cs
Reply With Quote
Thanked by:
  #4 (permalink)
 HealthWealthTrade 
San Diego
 
Experience: Advanced
Platform: NinjaTrader, ThinkorSwim
Trading: ES S&P 500
Posts: 35 since Jan 2015
Thanks Given: 10
Thanks Received: 22


cory View Post
I copy ninja ema code, copy your code and I see an arrow.
why not just use drawarrow using another part of the code is too confusing;
...
protected override void OnBarUpdate()
{
// IArrowDown arrow =
DrawArrowDown("MyArrowDown2",true, 0, High[0] + TickSize, Color.Red);
Value.Set(CurrentBar == 0 ? Input[0] : Input[0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
}

...

Thanks for that Cory, are you using NT 7 or 8 ? What value are you using for Period.....

Started this thread Reply With Quote
  #5 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


HealthWealthTrade View Post
Hey guys, I need help with some programming in NinjaScript 7. I tried to post on their support site but i couldn't register; so i came here.

This is the code:
IArrowDown arrow = DrawArrowDown("MyArrowDown2",true, 0, High[0] + TickSize, Color.Red);

I've also tried without the IArrowDown and the = sign in the front and neither worked.

It does not print an arrow on the screen no matter what i do....also this code is in the onBarUpdate() function.

Thanks!,
HealthWealthTrade

@HealthWealthTrade,

You could try:

DrawArrowDown("MyArrowDown2" + CurrentBar, false, 0, High[0] + TickSize, Color.Red);

If the arrow is too close to the price bar, then offset it a few ticks by changing + TickSize to "+ 2*TickSize or 3*TickSize until it's far enough away that it doesn't obscure the pricebar.

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
Thanked by:
  #6 (permalink)
 HealthWealthTrade 
San Diego
 
Experience: Advanced
Platform: NinjaTrader, ThinkorSwim
Trading: ES S&P 500
Posts: 35 since Jan 2015
Thanks Given: 10
Thanks Received: 22

Ok, now i have arrows printing on the chart...which is fantastic!!! I'm so happy....but now i have a different problem....it only prints for the most recent moves.....it doesn't print them when i scroll back and look at previous data.....anyone know how to fix that?

Your help is very much appreciated,
HealthWealthTrade

Started this thread Reply With Quote
  #7 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


HealthWealthTrade View Post
Ok, now i have arrows printing on the chart...which is fantastic!!! I'm so happy....but now i have a different problem....it only prints for the most recent moves.....it doesn't print them when i scroll back and look at previous data.....anyone know how to fix that?

Your help is very much appreciated,
HealthWealthTrade

@HealthWealthTrade,

Try my suggestion (post # 5) "+CurrentBar". That should print arrows every time the condition occurs and leave them on the chart for scroll-back.
Or, post your indicator here & someone will take a look at the code to see what can be done to achieve what you're looking for.

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
Thanked by:
  #8 (permalink)
 HealthWealthTrade 
San Diego
 
Experience: Advanced
Platform: NinjaTrader, ThinkorSwim
Trading: ES S&P 500
Posts: 35 since Jan 2015
Thanks Given: 10
Thanks Received: 22

Thanks to wizard, now my chart has arrows all over. it worked....thanks a lot guys.

Started this thread Reply With Quote




Last Updated on April 1, 2018


© 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