Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EasyLanguage to NinjaScript

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

  • RobinT
    replied
    I had to trim the file to upload it and I was referring to the NT license.
    Attached Files

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    Can you attach the ES historical data to your response so we may test on our end?

    What Licensing item do you refer to?

    Leave a comment:


  • RobinT
    replied
    I was able to solve all my screen resolution issues with:

    res = ChartControl.BarSpace ; // gives bar spacing
    value1 = ChartControl.Width ; // gives horizontal window size
    value3 = ChartControl.BarsPainted ; // gives number of bars visible
    res_offset = ( MAX( High, value3 )[0] - MIN( Low, value3 )[0] ) / 35;
    // gives vertical resolution
    so all resolution problems solved.

    I think scroll position is something to do with:

    Point z = new Point ( 200, 200 ) ;
    ChartControl.AutoScrollOffset = z ;

    and I would appreciate help with the timezone problem and license key.

    Leave a comment:


  • RobinT
    replied
    It looks like

    int z = ChartControl.BarSpace ;

    give me screen resolution.

    do you know which one give me scroll position?

    Leave a comment:


  • RobinT
    replied
    what do you know about:

    int y = ChartControl.

    this seems to include everything I want, but there is no documentation.

    Leave a comment:


  • RobinT
    replied
    More on the data problem.

    All data Historical, not connected to a feed. Exported 1 minute data from Tradestation using the NT supplied strategy.

    Data taken from @ES which is continuous futures back to 1/1/15.

    Two copies, one named ES 03-16 and one called SPY.

    Both import OK but ES only goes back to 12/11 but SPY works.

    New problem, Timezone.

    The data is all timestamped correctly from 2:30 pm to 9PM (UK NYSE opening hours).

    The data is all imported ok as I have checked it with the data editor in Historical data manager. All data has same timestamps for whole year.

    But, when loaded, NT compensates for summer time and leaves a blank for a hour when summer time put the clocks out of sync. I cant find any way of turning this off. Ideas?

    Leave a comment:


  • RobinT
    replied
    I thought I had a brainwave and everything I needed would be in the registry but alas NT does not appear to use the registry. I have nearly finished the app and here is what I still need:

    1- How do I get the screen resolution into NT, I mean of the chart not the actual screen res.

    2 - How do I scroll to a DateTime on the chart?

    3 - How do I get the license key or system ID so I can use my security?

    4 - You can RemoveDrawObject( tgt.Tag ) ; using the Tag but is there a way of getting the other properties via the Tag. I had to store all the IRay objects in an array and index them, very tedious.

    5 - Is there a way of automating the Historical Data Import process?

    Leave a comment:


  • RobinT
    replied
    Thank you for the nthLowest suggestion.

    I am not connected my data is all Historical.

    I have 1 minute data from Tradestation going back to 1/1/15 for both @ES continuous futures and SPX. I import these both with Historic Data Manager. SPX (^SP500) works fine and if I rename ES to SPY stock it works fine too. However, as ES 03-16 it only goes back to 12/11/15.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Originally posted by RobinT View Post
    where would I find this unsupported code.
    I would not have this code on hand.
    Originally posted by RobinT View Post
    Can you suggest a way of doing this:

    value61 = LowestBar(Low, 4);

    but if bar 0 is the lowest I want the next lowest. TS has a nthlowestbar function and I wondered if NT has an equivalent. How can I use indexing or how can I find the lowestbar of [1], [2], [3].
    You could use two loops in the following fashion:
    Code:
    			int first = 0;
    			int second = 0;
    			int period = 20;
    			double low = Low[0];
    			
                for (int i = period; i >= 0; i--)
    			{
    				if (Low[i] < low)
    				{
    					low = Low[i];
    					first = i;
    				}
    			}
    			low = Low[first+1];
    			for (int i = period + first; i >= first; i--)
    			{
    				if (Low[i] < low)
    				{
    					low = Low[i];
    					second = i;
    				}
    			}
    Originally posted by RobinT View Post
    I dont seem to be able to display ES 03-16 before 12/11/15 even thogh I have 1 minute historical data going back to 12-30-14. I have SPX data for the same period and it displays ok. What am I doing wrong?
    Originally posted by RobinT View Post
    if I import the same data as SPY it works ok. Is there some restriction for futures?
    Who are you connected to when you attempt to load the futures data? How far back does the data go?

    Leave a comment:


  • RobinT
    replied
    if I import the same data as SPY it works ok. Is there some restriction for futures?

    Leave a comment:


  • RobinT
    replied
    I dont seem to be able to display ES 03-16 before 12/11/15 even thogh I have 1 minute historical data going back to 12-30-14. I have SPX data for the same period and it displays ok. What am I doing wrong?

    Leave a comment:


  • RobinT
    replied
    wrote my own.

    Leave a comment:


  • RobinT
    replied
    Can you suggest a way of doing this:

    value61 = LowestBar(Low, 4);

    but if bar 0 is the lowest I want the next lowest. TS has a nthlowestbar function and I wondered if NT has an equivalent. How can I use indexing or how can I find the lowestbar of [1], [2], [3].

    Leave a comment:


  • RobinT
    replied
    where would I find this unsupported code.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    The amount of data would be controlled by the chart. Screen resolution and bar spacing would require unsupported code.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by kinfxhk, 07-14-2026, 09:39 AM
0 responses
129 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 10:18 AM
0 responses
105 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 09:50 AM
0 responses
87 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 07:21 AM
0 responses
106 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-11-2026, 02:11 AM
0 responses
86 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X