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

jak přepsat tento kod z NT7 do NT8?

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

    jak přepsat tento kod z NT7 do NT8?

    Hello,
    i need to rewrite simple code from NT7 to NT8 i tried everything but i don't know how can you help me? the code in NT7 is
    Click image for larger version

Name:	Poznámka 2019-11-20 192139.png
Views:	282
Size:	16.9 KB
ID:	1078386
    Thank you for your help.

    #2
    Hello Redlister,

    Thanks for your post and welcome to the NinjaTrader forums!

    You should be able to create the same in the Ninjatrader strategy builder. (new>Strategy Builder).

    Please review the help guide for the strategy builder here: https://ninjatrader.com/support/help...gy_builder.htm In particular look at the examples on the condition builder page of the help guide.

    You may want to attend the Free strategy builder webinar here: https://ninjatrader.com/PlatformTraining (Strategy Builder is every other Thursdays, alternating with Ninjascript Editor).

    Alternately, you can review a previous recording here: https://www.youtube.com/watch?v=HCyt...We0Nf&index=11

    In the NT7 strategy wizard it looks like you are trying to compare the current bid volume to the value of the prior day close. I think you want to use just the current bid value.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello PaulH,

      I need advice on two points:

      1; how to set the strategy to trade only one trade per day. The strategy works on the principle that if the conditions are met, it starts at the beginning of the trading session (about 1-5 hours after opening), if everything runs as it should, the strategy closes at the end of the day, or at stop loss. But if he closes at the stop loss, I do not want to trade again that day, even if the conditions for entry again meet.

      2; how to set a closing position at the end of a trading session template, it is only set to daily session 15: 30-22: 15, CET (8: 30-am-3: 15-pm, CST), poud will end for some reason sooner (holiday ) and I'm in the position of strategy shining orange color until the next day until opening.

      thank you for your advice with regards Redlister

      Comment


        #4
        Hello Redlister,

        Thanks for your post.

        In the case of a single entry per day, you can create a "bool" type variable that is either true or false. Create the bool and set its default value to true. In the action section of the set where you place the order you would set the bool to be false. In the entry conditions of that same set you would add a check to see if the bool is true. So the first time the conditions are true and the bool is true the order is placed and the bool is false thus preventing further entries.

        You would also need to create another set where the condition is reset back to true, typically you would reset daily variables on the first bar of the session. If you want to do that then you will find in the Misc folder "first bar of session" which is a bool that you can check if it is true and the actions then would be to set the bool you created to true.

        Regarding, "2; how to set a closing position at the end of a trading session template, it is only set to daily session 15: 30-22: 15, CET (8: 30-am-3: 15-pm, CST), poud will end for some reason sooner (holiday ) and I'm in the position of strategy shining orange color until the next day until opening." I am not sure I understand what the question is. Can you restate in a different way?
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by inanazsocial, Today, 01:15 AM
        0 responses
        2 views
        0 likes
        Last Post inanazsocial  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        22 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Started by guillembm, Yesterday, 11:25 AM
        2 responses
        9 views
        0 likes
        Last Post guillembm  
        Started by junkone, 04-21-2024, 07:17 AM
        9 responses
        71 views
        0 likes
        Last Post jeronymite  
        Working...
        X