NexusFi: Find Your Edge


Home Menu

 





Arrows not plotting on price panel


Discussion in NinjaTrader

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




 
Search this Thread

Arrows not plotting on price panel

  #1 (permalink)
kendallw4
Raleigh, USA
 
Posts: 3 since May 2011
Thanks Given: 0
Thanks Received: 1

I can't seem to get the arrows to plot in the price panel. Could someone let me know what I'm missing?

Attached Files
Elite Membership required to download: DF.cs
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Spoo-nalysis ES e-mini futures S&P 500
24 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


I am not astonished that it does not plot arrows. I am quite sure that it does not do any thing.

Here is the reason: OnBarUpdate() starts with the first bar on the chart, which is CurrentBar = 0. If you call Close[4] during the first run of OnBarUpdate(), you actually call the bar (-4), which unfortunately does not exist. Therefore the only thing that the indicator will generate is an error in your logfile.

Checking for Close[3] > Close[4] does only make sense, if the CurrentBar > 3. So you need to insert two additional lines in the beginning of OnBarUpdate()

 
Code
if (CurrentBar < 4)
      return;
Furthermore, your conditions are flawed. For example look at the condition set 1:

First line -> Close[0]<Close[1]
Third line -> ((Close[0] - Low[1]) + Close[0]) > ((Close[1] - Low[1]) + Close[1])

The third line condition is equivalent to Close[0] > Close[1], which in contradiction with the first line. This means that the condition set 1 will never take the value "true" and that the arrow will never be drawn...

In a similar way the condition set 2 is flawed:

First line -> Close[0]>Close[1]
Third line -> ((Close[0] - Low[1]) + Close[0]) > ((Close[1] - Low[1]) + Close[1])

Both conditions are identical, so the third line is redundant.

I think you should rework the conditions as well.

Just because you asked.





.

Reply With Quote
Thanked by:




Last Updated on June 28, 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