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

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​
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sugalt, Today, 04:02 AM
      0 responses
      0 views
      0 likes
      Last Post sugalt
      by sugalt
       
      Started by bc24fl, 08-30-2019, 01:58 PM
      3 responses
      256 views
      0 likes
      Last Post PaulMohn  
      Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
      6 responses
      28 views
      0 likes
      Last Post tradingnasdaqprueba  
      Started by PaulMohn, Today, 02:06 AM
      1 response
      3 views
      0 likes
      Last Post PaulMohn  
      Started by Mindset, Today, 01:27 AM
      0 responses
      5 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X