• 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

Adding TTM Squeeze Into Strategy

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

    Adding TTM Squeeze Into Strategy

    I'm trying to have the strategy enter a long when the squeeze is positive so it'd be reading the dots and which direction the bars are in. I'm struggling to get this into code.

    #2
    Hello trader_trash,

    Welcome to the NinjaTrader forums.

    Basically only plots can be used from an indicator in another script. Drawing objects aren't as easy to find or use.

    Is this indicator making a plot and setting plot values?

    Plots appear in the Data Box when middle mouse clicking or by right-clicking the chart.

    Are you receiving errors when calling the indicator?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      the script for the squeeze runs perfectly fine, the ttm has alerts built in when it's squeezing. I'm trying to add a custom system so when the squeeze happens do "x" in a strategy. But I can't figure out how to code in to call on something like that. I can only see how to call on fixed integers and not another defined thing.

      Comment


        #4
        Hello trader_trash,

        So to call an indicator the format is:
        IndicatorName(parameters).PlotName[barsAgo index]

        For example if I wanted to print the macd avg plot on the current bar:
        Print(MACD(12, 24, 16).Avg[0]):

        Below is a link to a forum post with helpful information about getting started with NinjaScript.
        https://ninjatrader.com/support/foru...040#post786040

        Have you attempted calling the indicator name in a script?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sergey_z, Today, 02:34 AM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by frankduc, Today, 05:24 AM
        2 responses
        9 views
        0 likes
        Last Post frankduc  
        Started by shmarola, Today, 01:01 AM
        0 responses
        4 views
        0 likes
        Last Post shmarola  
        Started by CriticalMind, 11-29-2015, 12:39 PM
        3 responses
        1,323 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by novel168, 06-14-2019, 09:20 PM
        2 responses
        10 views
        0 likes
        Last Post novel168  
        Working...
        X