• 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

Strategy and plotting a line

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

    Strategy and plotting a line

    Hi,

    I want to generate automated trades with EnterLong() and its cousins. I'm told I have to use a strategy since EnterLong() will not work inside an indicator (compilation fails).

    I also need to have lines drawn on the chart. These lines will represent the entry and exit points that are being monitored. Should the price action hit them, orders to buy or sell will be automatically generated.

    Add(new Plot(Color.Green,PlotStyle.Line, "PlotBuyLine"));

    is giving me the following error when I try to compile my strategy. Is this supported? If not, what are my options?

    Error: The best overload method match for NinjaTrader.... has some invalid arguments.

    Thanks in advance.

    -mp

    #2
    Hello,

    It is possible to plot from a strategy, however it will be a little different than you use in an indicator.

    Please take a look at our reference sample on Plotting from within a NinjaScript Strategy and let me know if you have any questions:

    http://www.ninjatrader.com/support/f...ead.php?t=6651
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Maxwell123, Today, 12:34 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by memonic, Today, 02:21 AM
    0 responses
    2 views
    0 likes
    Last Post memonic
    by memonic
     
    Started by Guru73, Yesterday, 02:47 AM
    5 responses
    33 views
    0 likes
    Last Post Guru73
    by Guru73
     
    Started by Guru73, Today, 01:35 AM
    0 responses
    2 views
    0 likes
    Last Post Guru73
    by Guru73
     
    Started by i2w8am9ii2, Yesterday, 04:41 PM
    1 response
    11 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Working...
    X