Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

volume buy sell signal

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

    volume buy sell signal

    hi.
    in need to write one script as below condition:
    if ( volume [candle 0] > volume [candle 1] ) in green color then give me buy signal and
    if ( volume [candle 0] > volume [candle 1] ) in red color then give me sell signal
    my question is which command can show ( volume candle[0] is greater than volume candle [1] ) to give me buy and sell signal?

    #2
    when i use below script it cant determine between green and red volume candle

    Print("volume up candle 1:"+VolumeUpDown().UpVolume[1]);
    Print("volume up candle 2:"+VolumeUpDown().UpVolume[2]);



    Print("\nvolume down candle 1:"+VolumeUpDown().DownVolume[1]);
    Print("volume down candle 2:"+VolumeUpDown().DownVolume[2]);​

    how can i show volume candle is green or red?
    in fact script cant understand green and red volume candle.

    Comment


      #3
      Hello f.saeidi,

      Thanks for your post.

      The VolumeUpDown indicator is a variation of the VOL (Volume) indicator that colors the volume histogram different color depending if the current bar is up or down bar.

      To detect if the bar is an up bar (green), you could create a condition that checks if the Close price (Close[0]) is greater than the Open price (Open[0]).

      To detect if the bar is a down bar (red), you could create a condition that checks if the Close price is less than the Open price.

      For example, Close[0 > Open[0] would check if the current bar is an up bar (green). Close[1] < Open[1] would check if the previous bar is a down bar (red).

      VolumeUpDown()[0] would be used to get the current bar's VolumeUpDown indicator value. VolumeUpDown()[1] would be used to get the previous bar's VolumeUpDown indicator value.

      Close: https://ninjatrader.com/support/help.../nt8/close.htm
      Open: https://ninjatrader.com/support/helpGuides/nt8/open.htm
      VolumeUpDown(): https://ninjatrader.com/support/help...eupdown​
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

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