Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterLongLimit + basic ns functioning

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

    EnterLongLimit + basic ns functioning

    hello Team and Reader,

    Is there not something wrong with the pictures attached ?
    Should the entries not all be occuring after a blue bar ?

    A little bit rusty after a few weeks pause with my strategy building, during this new test I was expecting the entries to only occur when the barbrush is blue (/when the entreembvl() bool condition is met).
    I remember encountering a similar "issue" (should be easily solved) in the past but I need a little help starting the deducing process here. What am I forgetting ?

    (the barbrush() method is just a derivative of BarBrush).
    Attached Files

    #2
    Hello Amedeus,

    From the image you have a condition only for the coloring of the bar, if you wanted the entry to use the same condition you need to add the entry to that condition as well.

    I otherwise would not be able to tell how the script runs just by an image, you would need to add Prints into that area of the script to output the values you are using. By doing that you would be able to see why a condition is working the way it is.

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

    Comment


      #3
      hey Jesse, thank you very much for the help,

      Since you offer, I would gladly have a little more of your assistance, which is much appriciated :

      see the new attachments.
      Side by side in the code are : an EnterLongLimit() order called "EnterLongLimitZzzzzz", and entZz = true; (a bool).
      Still in the code a little bit further is the labAnnexe_longEntrees() method which is only used as a "delegate" to trigger the orders with a bool (EntZz).
      Both orders are the same : EnterLongLimit(Convert.ToInt32(DefaultQuantity), Somedouble, "Somename");

      In the chart attachment of this, we can see the EntZz order still enters regardless of the condition (colored). While the EnterLongLimitZzzzzz order does trigger only when the condition is met (as expected).
      Do you have any idea of what could cause this divergence ?
      I was expecting them both to behave the exact same.
      Attached Files

      Comment


        #4
        Hello Amedeus,

        Again we really won't be able to help with images of code, we cannot execute that in the same use case to know why the logic worked as it did. You could add Print statements to the areas that you are picturing to get a better idea of how the logic you made works.

        Prints are a going to be a huge part of developing NinjaScript, without being able to accurately see what your logic sees you would just be guessing to know why it did or did not do something. Using prints allows you to output the values that the strategy is actually seeing to know why it was or was not true specifically.



        Comment


          #5
          hey Jesse, thank you very much,

          A simple print of the bool did always output true.
          This group of bools was actuallly not set as false by default.

          After correcting this, the behavior is back to normal, as the attached chart of the same episode shows.
          Solved !

          have a great day
          Merry Christmas
          Attached Files

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          67 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          142 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          76 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          47 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          51 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X