Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Uni Renko Reversal Bar

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

    Uni Renko Reversal Bar

    Hello,
    Should be simple but for some reason I can't get this to make markers on the chart on the correct candles. I've tried high, open, low variations with displacements to single out the candles that show in the attached photo but I can't get the formula correct. A little help is appreciated.

    Using uni renko bars, trying to place a marker on first candle after a wick reversal candle, 6 ticks each, the wick should be at least 3 ticks.

    Thanks!
    Attached Files

    #2
    Hello bsbisme,

    While I don't have any specific information for the unirenko as it is not a default item I can suggest that you use Prints to identify what is happening in your use case. Prints can be added into your conditions to check if they are becoming true when you think they should. If the prints are not working you may need to add prints outside of your condition and print the values you are comparing in the conditions, that will tell you why the condition was not true.

    Comment


      #3
      Thanks,
      Then how about the same question but with a range bar.....I want to identify bars where the open is no less that 3 ticks below the close on a 10 tick range bar. Thanks!

      Comment


        #4
        Hello bsbisme,

        To find the difference between two prices you can subtract one price from another. To know if it was more than 3 ticks you would make a condition checking if the amount of difference is greater than 3 ticks worth of price for that instrument.

        Comment


          #5
          Thanks. I know it's simple but the formulas I'm trying are not working. I need if (close-3 ticks) >=open OR (close-2) >=open OR (close-1) >= open AND close=high THEN print object. Do I need to use the "arithmetic" section, if so can you guide me as I obviously am not doing it correctly. Many thanks.

          Comment


            #6
            Hello bsbisme,

            If you are manually coding you can just use standard math with the prices, for example:

            double difference = Close[0] - Open[0];

            If we assume the ES is being used and the tick size is 0.25 a condition could be made:

            if(difference >= 0 && difference <= 0.75)

            This would be if the difference between the open and close is less than 3 ticks, it could be 1 2 or 3 ticks below the close. If the close price is higher than the open the resulting difference would be a positive number, for example 2000.50 - 2000 = 0.50 or 2 ticks.

            You can also use math to calculate a number of ticks from a difference by dividing:

            double ticks = difference / TickSize;
            Last edited by NinjaTrader_Jesse; 05-29-2024, 09:05 AM.

            Comment


              #7
              How about in strategy builder as I don't manually code. Thanks.

              Comment


                #8
                Hello bsbisme,

                To do this type of math in the strategy builder would require using a custom series, I will outline the steps to do that below. Keep in mind that the builder will be unable to convert the price difference into a number of ticks, that would require manual coding. For this type of condition you would have to figure out how much price difference the amount of ticks you want is and then use that price difference instead of ticks in the condition. For example 4 ticks on the ES would be 0.25 * 4 or 1 so 1 would be the amount of price difference to use in the condition to represent 4 ticks.
                1. In the builder go to the additional data tab
                2. Expand the Custom Series section
                3. Click Add
                4. Name your series and leave its default as type double.
                To set the difference to the series do the following in the conditions and actions screen:
                1. In Set 1 there should be no conditions
                2. In set 1 actions click Add
                3. Select Misc -> Set your series name
                4. Hover the mouse over the series value field and click Set
                5. In the window that appears select Price -> Close
                6. In the properties that appear you will see the offset area, select the minus symbol
                7. Hover the mouse over the 0 value and click Set
                8. Select Price -> Open

                This will subtract the low from the high and assign the value to the series. To use that value in a condition you would do the following:
                1. Create a new condition in set 2 or later by clicking Add
                2. Select the following:
                • Left side: Misc -> Custom series -> leave all the default values
                • Center: lesser equal
                • Right side: Misc -> Numeric value -> Enter the total difference you wanted to check for.

                Comment


                  #9
                  Amazing help, thanks....however, it will not compile. Mind checking the 2 images for me? Thanks again.
                  Attached Files

                  Comment


                    #10
                    Hello bsbisme,

                    From the images I don't see what specifically may be wrong. Can you click view code or does it produce an error? If you can click view code, do that and then try to compile to see if an error is listed.

                    Comment


                      #11
                      I rebuilt it this morning from scratch and it compiled this time. Many thanks for your help. Much appreciated!

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by NullPointStrategies, Today, 05:17 AM
                      0 responses
                      46 views
                      0 likes
                      Last Post NullPointStrategies  
                      Started by argusthome, 03-08-2026, 10:06 AM
                      0 responses
                      126 views
                      0 likes
                      Last Post argusthome  
                      Started by NabilKhattabi, 03-06-2026, 11:18 AM
                      0 responses
                      66 views
                      0 likes
                      Last Post NabilKhattabi  
                      Started by Deep42, 03-06-2026, 12:28 AM
                      0 responses
                      42 views
                      0 likes
                      Last Post Deep42
                      by Deep42
                       
                      Started by TheRealMorford, 03-05-2026, 06:15 PM
                      0 responses
                      46 views
                      0 likes
                      Last Post TheRealMorford  
                      Working...
                      X