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

Getting an indicator into strategy

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

  • outsource
    replied
    Originally posted by NinjaTrader_Paul View Post
    Hello,

    Thanks for your post.

    To assist, please send your log and trace files into PlatformSupport[at]NinjaTrader[dot]Com, mark as atten:Paul and a link to this thread.

    In addition to the files, please include in the email further information of:

    1) Advise what day you applied this (so I can find in log/trace files)
    2) advise the instrument and time frames used.
    3) provide the code used to add the indicator to the chart through the strategy.
    4) Provide a screenshot of, "...the indicator shows only partially".
    Hi,Paul!

    Sent!

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Originally posted by outsource View Post
    Hello,Support!

    Have no problem to get any indicator into strategy,but there`s one i can`t figure why it`s not showing on the chart.The strategy compiles,all the parts in place,but the indicator shows only partially and not being called via strategy.Could you please suggest the reason what may cause the indicator to show up just partially and not being called?

    Thank you!
    Hello,

    Thanks for your post.

    To assist, please send your log and trace files into PlatformSupport[at]NinjaTrader[dot]Com, mark as atten:Paul and a link to this thread.

    In addition to the files, please include in the email further information of:

    1) Advise what day you applied this (so I can find in log/trace files)
    2) advise the instrument and time frames used.
    3) provide the code used to add the indicator to the chart through the strategy.
    4) Provide a screenshot of, "...the indicator shows only partially".

    Leave a comment:


  • outsource
    replied
    Originally posted by koganam View Post
    The strategy is evidently not working with the code, or you would not have posed the question. That the strategy works with other indicators is apropos of nothing. The only issue is that the strategy is not working with the indicator code that you posted. That is the only issue.

    I never said that the code was stolen. I said that I do not look at anybody else's secret code, so that I cannot later be accused of stealing the code. I can only be accused of stealing code if I have seen it, so by not looking, I cannot be accused.

    If you want to put up the strategy code, once it is on an open forum, I am willing to look at it and see if I can help. You did not put up the strategy code; only the indicator code, so I have to presume that you wanted to keep the strategy code secret. That is why I cannot help any further. Of course, if NT support is willing to look at your code without it being posted publicly, that would be ideal. Otherwise you can take a chance on posting your strategy code, and see if one of us users can help you.
    Yes,i want to keep the strategy code secret as it cost me about $2K(several itterations),and it`s well worth it.I think it`s reasonable not posting it here.I can send it to you personally,though,if you wish and be willing to assist.It would be a fair exchange,i belive(your time and help vs the source code of the strategy).

    Leave a comment:


  • koganam
    replied
    Originally posted by outsource View Post
    The strategy is fine,it calls any indicators i put in.
    The strategy is evidently not working with the code, or you would not have posed the question. That the strategy works with other indicators is apropos of nothing. The only issue is that the strategy is not working with the indicator code that you posted. That is the only issue.
    And that`s NOT a stolen code,it`s available for free download.Plus there`s nothing that be telling do not change or do anithing with the code.If that was the case i wouldn`t put it here.The reason i put it here was just the author that didn`t reply for the request.
    I never said that the code was stolen. I said that I do not look at anybody else's secret code, so that I cannot later be accused of stealing the code. I can only be accused of stealing code if I have seen it, so by not looking, I cannot be accused.

    If you want to put up the strategy code, once it is on an open forum, I am willing to look at it and see if I can help. You did not put up the strategy code; only the indicator code, so I have to presume that you wanted to keep the strategy code secret. That is why I cannot help any further. Of course, if NT support is willing to look at your code without it being posted publicly, that would be ideal. Otherwise you can take a chance on posting your strategy code, and see if one of us users can help you.

    Leave a comment:


  • outsource
    replied
    I just added alerts,audible and e-mail and it`s working with the indicator.I wonder maybe there`s a way to pass the alerts signals to a strategy somehow?

    Leave a comment:


  • outsource
    replied
    The strategy is fine,it calls any indicators i put in.And that`s NOT a stolen code,it`s available for free download.Plus there`s nothing that be telling do not change or do anithing with the code.If that was the case i wouldn`t put it here.The reason i put it here was just the author that didn`t reply for the request.

    Leave a comment:


  • koganam
    replied
    Originally posted by outsource View Post
    Both,and did remove and then reload a strategy.All the same.
    Well, that is the low-hanging fruit. If the problem is not there, then your Strategy code shall have to be examined to find the problem: it must be in how the Strategy is calling the indicator.

    As a last test, you might try increasing BarsRequired to a much larger number. I just had to do that with something that I was writing. Once a very large number worked, it was easy to see where the problem code was. In that case too, the indicator worked fine when applied to a chart, but gave me this same message that you are getting when I called it from a Strategy.

    I do not look at other programmer's secret code, because I do not want to later be accused of stealing anybody's code: I cannot have stolen code that I have never seen. So unfortunately, I can be of no further help.

    All the best.

    Leave a comment:


  • outsource
    replied
    Originally posted by koganam View Post
    Where did you increase it? In the code or in the PropertyGrid? If in the code, did you remove and reload the Strategy?
    Both,and did remove and then reload a strategy.All the same.
    Attached Files

    Leave a comment:


  • koganam
    replied
    Originally posted by outsource View Post
    Increased BarsRequired,no errors in the Output Window.But it doesn`t solve the issue.
    Where did you increase it? In the code or in the PropertyGrid? If in the code, did you remove and reload the Strategy?

    Leave a comment:


  • outsource
    replied
    Originally posted by koganam View Post
    That often means that you do not have enough bars at the time that a statement is processed. Try increasing the BarsRequired property in the Strategy.

    Is there also an error in your Output Window?
    Increased BarsRequired,no errors in the Output Window.But it doesn`t solve the issue.

    Leave a comment:


  • koganam
    replied
    Originally posted by outsource View Post
    Can anyone assist with that one?
    That often means that you do not have enough bars at the time that a statement is processed. Try increasing the BarsRequired property in the Strategy.

    Is there also an error in your Output Window?

    Leave a comment:


  • outsource
    replied
    Originally posted by outsource View Post
    Hi,Koganam,

    yes,there`s an error in the log,i didn`t look at it at first,but it tells nothing to me anyway.

    There error is:

    Method:Void OnBarUpdate() Exception: System.IndexOutOfRange
    Can anyone assist with that one?

    Leave a comment:


  • outsource
    replied
    Originally posted by koganam View Post
    What is the error in your log?
    Hi,Koganam,

    yes,there`s an error in the log,i didn`t look at it at first,but it tells nothing to me anyway.

    There error is:

    Method:Void OnBarUpdate() Exception: System.IndexOutOfRange

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello outsource,

    The indicator you have provided loads without issue on my chart.

    Is this the indicator you are attempting to add through your strategy?

    Can you provide the full syntax you are using for the Add() method to call this in your strategy?

    Leave a comment:


  • koganam
    replied
    Originally posted by outsource View Post
    It`s rathe advanced study,so needs more then i can bring.
    What is the error in your log?

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by sofortune, Yesterday, 11:48 AM
2 responses
23 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by Zach55, 02-19-2024, 07:22 PM
2 responses
55 views
0 likes
Last Post lbadisa1  
Started by JGriff5646, Today, 05:47 PM
1 response
9 views
0 likes
Last Post NinjaTrader_BrandonH  
Started by AlphaOptions, 06-18-2013, 08:24 AM
9 responses
2,200 views
0 likes
Last Post NinjaTrader_Manfred  
Started by ttrader23, Today, 09:33 AM
3 responses
23 views
0 likes
Last Post NinjaTrader_BrandonH  
Working...
X