Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Converting TS indicator for NinjaTrader

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

    Converting TS indicator for NinjaTrader

    Hello All,

    I am new to ninja trader development and trying to see if anyone can help me to create an indicator that plots current days price + or - to previous days close as of 4:15pm EST on each bar of the current day as a histogram.

    ie; ES close previous day 982.00 & Current 5min or whatever period bar closes at 984.00

    so histogram at close of current bar below it would plot, +2.00

    or if current bar closed at 980.00 then the histogram at close of bar below it would plot, -2.00

    If anyone could put me on the path or show me how that would be written in ninja, I would greatly appreciate it! God Bless and Good Trading To All.

    Brian
    TS CODE BELOW:
    Here is an exact copy of the TS code I am trying to Reproduce in NinjaTrader,
    I am not sure, but I don't think I can have 2 symbols on the same chart in NinjaTrader, like you can in TS so I am only interested in the Plot working for the current symbol that I would be able to place the indicator on. If I needed to place 2 seperate charts up to get the same effect as TS with 1 chart that would be fine also. Thanks all, Brian.

    Inputs: PriceES(Close of Data1), PriceNDQ(Close of Data2);

    Vars: ESLevel(0), NDQLevel(0), ESYDC(0), NDQYDC(0),
    Started(FALSE);

    if Date<>Date[1] then
    begin
    ESYDC = Close[1];
    NDQYDC = PriceNDQ[1];
    Started=TRUE;
    end;

    if Started then
    begin

    ESLevel = Close-ESYDC;
    NDQLevel = PriceNDQ-NDQYDC;

    end;

    Plot1(ESLevel,"es");
    Plot2(NDQLevel,"ndq");
    Plot3(0,"zero");

    if Date<>Date[1] then begin

    Print("");
    Print("");

    end;

    Print(Date:10:0,Time:6:0,"ES=",ESLevel," NQ=",NDQLevel);




    Last edited by marketprofiletrader; 08-02-2009, 10:00 AM. Reason: Pasting Copy Of Exact TS Code For Possible Duplication in Ninja

    #2
    Brian, thanks for the post and welcome to our forums. It would be easier to understand if you posted the TS source code you have, hopefully commnuity members will give a shot to convert then. For our indicator coding tutorials, please see this link - http://www.ninjatrader-support.com/H...verview18.html

    For professional custom coding in NinjaScript, you can contact those consultants - http://www.ninjatrader.com/webnew/pa...injaScript.htm
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    32 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    4 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    6 views
    0 likes
    Last Post cre8able  
    Started by Haiasi, Today, 06:53 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X