• 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

Instrument or Period change within Code

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

  • NinjaTrader_AdamP
    replied
    bestof61,

    That is technically possible however not supported. Hopefully someone would be able to help you out there.

    You can use BarsPeriod.Id in Initialize(), it's done in the following indicator for example :

    http://www.ninjatrader.com/support/f...d=4&linkid=367

    Leave a comment:


  • bestof61
    replied
    Thanks AdamP for the fast reply.
    But it is not what I like to do.
    First i like to use the Value: this.BarsPeriod.Value = myPeriod within my Code. But it is as you guys told me not supported. By my fault i used it and at the end of the day i had to reinstall NT.
    However I wonder if i could redirect the output of a program to the screen as i am able to enter the period or instrument on a chart.
    So what i like to do in my Code(Indicator or strategy does not matter):
    1. Choose a chart as i do with left click of my mouse on the screen
    2. Enter a period as i do it with the keyboard my enter e.g. "M15" or "NQ 09-12"
    regards,

    bestof61

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    bestof61,

    You can use a multi-timeframe strategy if that is what you are referring to :

    http://www.ninjatrader.com/support/h...nstruments.htm

    A sample comes with NinjaTrader in Tools > Edit NinjaScript > Strategy > SampleMultiTimeframe

    It's a strategy but the idea is very similar for indicators.

    Leave a comment:


  • bestof61
    started a topic Instrument or Period change within Code

    Instrument or Period change within Code

    Hello,
    is there a way to enter e.g. "15M" within Code. I thinking of writing an Indicator in order to change the period programmatically?
    regards,
    trader61

Latest Posts

Collapse

Topics Statistics Last Post
Started by gemini42, Yesterday, 09:44 PM
0 responses
5 views
0 likes
Last Post gemini42  
Started by martyn73, Yesterday, 03:09 PM
0 responses
2 views
0 likes
Last Post martyn73  
Started by martyn73, Yesterday, 03:05 PM
0 responses
4 views
0 likes
Last Post martyn73  
Started by mic414, Yesterday, 02:17 PM
0 responses
1 view
0 likes
Last Post mic414
by mic414
 
Started by U0000999, 11-15-2019, 06:18 PM
1 response
22 views
0 likes
Last Post NinjaTrader_ChrisL  
Working...
X