• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Refresh Issue during live market

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Refresh Issue during live market

    I have a custom indicator that colors bars either red, green, or gray. I have calculate on barclose set to false so I can see what's going on just prior to barclose. These bars may change color several times during the life of the bar. However, many times upon barclose the bar is the wrong color. I can reload the script and the bar is correct. Can you offer any assistance why this might happen. The code is pretty simple. It is contained in the OnBarUpdate() method and checks that other CCIs that are superimposed are pointing are either rising or falling. This occurs at line 246.

    Can you please offer any suggestions as to why they don't paint properly. I have other custom indicators that do the same thing. Quite frustrating because I can't depend on the entry being correct.

    Thank you,
    Mike Winfrey
    Attached Files

    #2
    I would add Print() statements that include

    CurrentBar.ToString() + conditionValue that changes the bar color + codeLocationMarker such as line number

    Run this in real-time, save the output, reload it.

    On reload, you should have one output per bar. You can then real-time ouput to reload ouput. The last line before CurrentBar rolls to a new one should plot out the same value as the reload output.

    Once you have this data, you can see in your code what might be causing an issue.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by brunoviveiros, Today, 04:31 AM
    2 responses
    13 views
    0 likes
    Last Post brunoviveiros  
    Started by foxy_rav, Today, 06:31 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by neilzep, Today, 06:42 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by teafortwo, Today, 04:26 AM
    3 responses
    8 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by autogenix, Today, 12:54 AM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_Marco  
    Working...
    X