• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Multi Time Frame strategy

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

    Help with Multi Time Frame strategy

    So im writing a small strategy to draw an object every time a 1 volume charts close price crosses a line on a 100 volume chart. My code only draws one triangle, it should draw a triangle each time 1 volume is traded below or above the lower and upper bands of this bollinger. Any Ideas?

    Code:
     protected override void OnBarUpdate()
            {
                // Condition set 1
                if (BarsInProgress == 1)
                    return;
                
                if (Closes[1][0] < Bollinger_v1(BarsArray[0], Bollinger_v1_ColorBasis.Compressing_Decompressing, 0, AStandard, Bollinger_v1_OutputType.RegressionChannel, APeriod).Lower[0])
                {
                    DrawTriangleUp("My triangle up" + CurrentBar, true, 0, Close[0], Color.Lime);
                    Print(Opens[1][0]);
                }
    
                // Condition set 2
                if (Closes[1][0] > Bollinger_v1(BarsArray[0], Bollinger_v1_ColorBasis.Compressing_Decompressing, 0, AStandard, Bollinger_v1_OutputType.RegressionChannel, APeriod).Upper[0])
                {
                    DrawTriangleDown("My triangle down" + CurrentBar, true, 0, Close[0], Color.Red);
                }
            }

    #2
    Hi Floyd, what exact series are you adding and working with, and in which order?
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ralett, Today, 11:52 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by rtwave, Yesterday, 07:06 PM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by DTSSTS, Today, 11:27 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by siroya, Today, 10:02 AM
    2 responses
    9 views
    0 likes
    Last Post DTSSTS
    by DTSSTS
     
    Started by pjsmith, Today, 10:50 AM
    0 responses
    9 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Working...
    X