Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help needed: script for Market Analyzer

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

    Help needed: script for Market Analyzer

    Hello everybody!

    I'm pretty new to Ninja Script programming and was trying to make it through Indicators Wizard, but failed to compile the script...

    Could anyone please help me with the following question:

    I want to create a very simple indicator, that I could put in Market Analizer to see the following for the list of stocks:

    1) If Current Daily Bar Open > Previous Daily Bar High = Market Analyzer will Indicate GAP UP (Green)
    2) If Current Daily Bar Open < Previous Daily Bar Low = Market Analyzer will Indicate GAP DOWN (Red)

    Thanks a lot in advance

    #2
    Hello by_maxxx,

    Welcome to the NinjaTrader forums!

    For scanning in the market analyzer, you can work off plot values. A common approach is setting your plot as 1 when the condition is true and 0 otherwise. You can then check when the column is 1 and color based on this value.

    Here's how the high portion of your condition might be written:

    if (CurrentDayOHL().Open[0] > PriorDayOHLC().PriorHigh[0])
    Plot0.Set(1);

    else
    Plot0.Set(0);
    Last edited by NinjaTrader_RyanM1; 01-13-2011, 09:55 AM.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by i019945nj, 12-14-2023, 06:41 AM
    4 responses
    63 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by thread, Yesterday, 11:58 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by stafe, Yesterday, 08:34 PM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by jclose, Yesterday, 09:37 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by firefoxforum12, Yesterday, 08:53 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X