Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two Variable Crossovers: Unique

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

  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for providing me that info.

    Your strategy is programmed to EnterLong() in a CrossAbove and EnterShort() in a CrossBelow.

    When the opposite Crossover occurs, your position will reverse. For example, EnterLong() will reverse your position from a short position if it is called from a short position. The same would apply for the opposite.

    Your strategy is behaving as you have programmed it. It sounds like you are expecting it to perform actions under less or greater than conditions rather than Crossover conditions.

    In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners. However, we do have an EcoSystem of third party NinjaScript consultants that would be happy to help you develop and debug your strategies for you. If this interests you, please send a message to platformsupport[at]ninjatrader[dot]com with the text "1676289 ATTN Jim" in the subject of the email and I will have a member of our Business Development team pass over a list of vendors.

    Please let me know how we may assist you further.

    Leave a comment:


  • Kubera2024
    replied
    Here's is the code logic, it uses 'crossover'.
    Attached Files

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for replying with that.

    Let's stick to looking at this with NinjaTrader 8's charts as that is the best way we can share information with each other as well as other users on the forum.

    Originally posted by Kubera2024 View Post
    The green line is the static variable, either from indicator or preset manually by user. Notice the last 3 bars are below the variable but the system still stayed long. And if price escapes the zone, the system will have huge drawdown.
    I do not witness a cross over of the closing price for that interval. I would suggest to use logic in the Strategy Builder that checks if the current price is less than your variable if you would like to see that behavior. Crossing above or below has a different logical concept than simply being greater or less than.

    Also, I have updated my previous post with information on the feature request.

    Please let me know if I may be of further help.

    Leave a comment:


  • Kubera2024
    replied
    Post PT hit.
    Attached Files

    Leave a comment:


  • Kubera2024
    replied
    Here is another variation.
    Attached Files

    Leave a comment:


  • Kubera2024
    replied
    Here is how it looks on another platform. This one doesn't have error checking either. So some crosses are missed and manual injection/fix is needed.
    Attached Files

    Leave a comment:


  • Kubera2024
    replied
    The green line is the static variable, either from indicator or preset manually by user. Notice the last 3 bars are below the variable but the system still stayed long. And if price escapes the zone, the system will have huge drawdown.
    Attached Files

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for the reply.

    The CrossAbove and CrossBelow functions are meant to be basic and simple. Error checking will always be subjective to each user's implementation in their strategy or indicator. As such, this is a matter that is best handled by each individual programmer to use the tools available to create the functionality they desire. Error checking is a regular task programmers have to look into when developing code.

    The Strategy Builder is designed to create basic NinjaScript code within the confines of its interface. I believe the feature I mentioned will assist you and others to create robust strategies and the necessary error checking to make these strategies more powerful without having to unlock and program manually. I will go ahead and submit the feature request.

    The feature request is being tracked with ticket ID SFT-2059 and can be seen in the Release Notes of the version of NinjaTrader 8 that contains the feature request's implementation. You can use the link below to view the Release Notes page of the help guide.

    Release Notes: http://ninjatrader.com/support/helpG...ease_notes.htm

    You may also writing in to platformsupport[at]ninjatrader[dot]com to ask a technician on the status of the ticket ID.

    As far as the error checking you are describing, what is the expected behavior that you would like to see? We may be able to provide a solution for you using the Strategy Builder.

    Could you also elaborate on "how it fails to respect the the direction?" The strategy's chart is appearing to enter Long and enter Short when after a cross over occurs.

    Please provide the associated logic with the behavior that you are describing. You can send me screenshots of the Strategy Builder or copy the unlocked code and place it in [CODE] blocks in your reply.

    To send a screenshot with Windows 7 or newer, we recommend using Window's Snipping Tool.

    Click here for instructions

    Alternatively, please take a screenshot with Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction


    Please provide me answers to the above questions so I may assist you further.
    Last edited by NinjaTrader_Jim; 03-22-2017, 10:36 AM.

    Leave a comment:


  • Kubera2024
    replied
    notice how it fails to respect the the direction, that's why a error checking mechanism is needed for crossover generated orders.
    Attached Files

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for providing that feedback.

    For your first feature request, this sort of thing is left to the design of your NinjaScript Strategy and falls outside the design of the Strategy Builder or the NinjaTrader Platform. The strategy you described can be programmed by you, but it cannot be made in the Strategy Builder unless a feature to "set a variable to its current value with a mathematical offset" is implemented first. I could submit a feature request for this and you will be able to create this functionality using the Strategy Builder.

    For your second feature request, this isn't an issue we are currently tracking, but this would be possible by setting up your own private server to host your NinjaTrader platform along with your strategies.

    As for your 3rd and 4th suggestions, these sorts of suggestions fall outside of the scope of the NinjaTrader platform, so there is not a space where I may suggest this "feature." However, there is nothing stopping you or another user to create these spaces on the internet.

    Please let me know if you would like me to submit a feature request for the Strategy Builder to "set a variable to its current value with a mathematical offset" if you would like to have this ability to build your strategy in the Strategy Builder.

    Leave a comment:


  • Kubera2024
    replied
    Feature Request:

    1) Strategy check of last signal to see if current position matches last signal.
    2) Ninjatrader Servers to transfer Strats to run on their own.
    3) Prototype Hedge Fund Group - Pooling knowledge and resources where people come together to design strategies, where Ninjatrader itself would be considered 'one person'. Coders and alpha generators come together to succeed. The group splits the profits when they vote to 'distribute' or not.
    4) Groups can compete, and a rankings list is maintained.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for replying.

    In order to have your strategy's logic process every 5 seconds, you want to have the primary data series set to 5 seconds. You can create a condition that checks if 12 bars have been iterated to create a condition that occurs every 60 seconds.

    Currently, there is no feature to set a variable to its current value with a mathematical offset within the Strategy Builder. If you would like, I may submit a feature request on your behalf to add this ability to the Strategy Builder.

    I will provide some sample code that describes how this can be done in NinjaScript, but I will not be able to provide assistance in developing your strategy or debugging your code. If you are looking for those services, you can write in to platformsupport[at]ninjatrader[dot]com with the ticket number "1676289" and the text "Attention Jim." I will be able to get you connected with a member of our Business Development team who can provide a list of NinjaScript Consultants who would be happy to develop and debug your code.

    Sample code for checking if 12 bars have passed (60 seconds on a 5 second primary data series) is as follows:

    Code:
    if (BarsIterated >= BarsToWait)
    {
    	// your logic here
    	BarsIterated = 0;
    }
    BarsIterated++;
    You will need to create 2 integer variables for BarsToWait and BarsIterated.

    Please let me know if you would like me to submit a feature request for adding this functionality to the Strategy Builder.

    Leave a comment:


  • Kubera2024
    replied
    How is the time check done.. the position rules need redundancy. That's why a traditional crossover study is not enough. Lets say you implemented moving average study, and power goes out, and system comes back online.. while power was out, a long was triggered but was never triggered in brokerage account. When system is turned back on, it immediately checks itself to buy a long.
    Last edited by Kubera2024; 03-14-2017, 04:52 PM.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Kubera2024,

    Thanks for providing us that information.

    This strategy can be created using the Strategy Builder.I have created a brief video that demonstrates how you can do this.

    https://www.screencast.com/t/njyMdSQIg

    I would suggest to also check out the Strategy Builder 301 webinar for further understanding how to create strategies using the Strategy Builder. You may register for a live webinar as well where you may ask questions to a live presenter regarding the Strategy Builder.

    Strategy Builder 301 webinar - http://ninjatrader.com/Webinar/Strategy-Builder-301
    Strategy Builder 301 recording - https://www.youtube.com/watch?v=HCyt90GAs9k

    Please let us know if we may be of further assistance.

    Leave a comment:


  • Kubera2024
    replied
    Also you can have the Strat set the Trend filter, based on defined indicator. Instead of manually setting it.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by nikorrriko, Today, 04:42 PM
1 response
10 views
0 likes
Last Post NinjaTrader_ThomasC  
Started by rajeshks1988, Yesterday, 05:32 AM
1 response
16 views
0 likes
Last Post cincai
by cincai
 
Started by MaraAnkh, Yesterday, 08:44 PM
1 response
23 views
0 likes
Last Post cincai
by cincai
 
Started by [email protected], Today, 06:10 PM
4 responses
11 views
0 likes
Last Post bpatel20@gmail.com  
Started by sgordet, Today, 02:24 PM
0 responses
14 views
0 likes
Last Post sgordet
by sgordet
 
Working...
X