Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Brought two scripts into one having an issue

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

    Brought two scripts into one having an issue

    Where I have two separate indicators works like it should, (ThreePushUp) it's when I brought both into one script, the WedgeSpotter. It's painting both bars up and down dark red, only the down should paint dark red. I'm not doing something right?

    I did get this to work with no problems with the CandleOutlines as one indicator. Last pic but can't see that great.
    Attached Files

    #2
    Hello trdinstyle,

    Thank you for your post.

    I recommend adding debugging prints to your script to better understand what is occurring. Since you are comparing the High price for the current and previous two bars as well as the Low for the current and previous two bars, You could add print statements to show the values in the NinjaScript Output window. You could also add a print statement inside of each condition when the BarBrushes[1] is adjusted to understand when the conditions are evaluating to true. Another suggestion for testing is to use two different colors to see visually when one condition is true vs. the other condition. For more information about BarBrushes:


    An example of the debugging prints you could add are as follows:

    if (CurrentBar<2)
    return;

    Print(String.Format("{0} High[1] {1} > High[0] {2} && High[2] {3} < High[1] {4}", Time[0], High[1], High[0], High[2], High[1]));
    Print(String.Format("{0} Low[1] {1} < Low[0] {2} && Low[2] {3} > Low[1] {4}", Time[0], Low[1], Low[0], Low[2], Low[1]));

    // inside of each condition, you could add a line like the following:
    Print("Up");
    // or
    Print("Down");

    For more information regarding debugging prints, please see the following page:


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

    Comment


      #3
      Hello Emily, I'm looking forward to trying this out. Looks good. Thank you.

      Like this? This is a trouble shooting method, right? It made all the bars red; I know I'm not applying this right.
      Attached Files
      Last edited by trdninstyle; 10-10-2022, 06:17 PM.

      Comment


        #4
        I went back to the drawing board, and I added Up and Down to the various places and it compiled, and it solved the issue.
        I compared it to one of my other ones that was working and saw what I wasn't doing.

        Thank you for the good tips I did learn something from them, I watched part of a video by Chelsea. B helped w/ some clarity of other things. It's a journey.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X