Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I want to compare the Close[0] relative to a custom MA line

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

  • kaywai
    replied
    that removed the error! Thx Tim!

    Leave a comment:


  • NinjaTrader_Tim
    replied
    Hi kaywai,

    I am not familiar with the draftMA1 indicator, but it is likely you need a barsAgo reference, so something like...

    if (Close[0] > draftMA1(Close,5)[0])

    Leave a comment:


  • I want to compare the Close[0] relative to a custom MA line

    tried this:-

    Code:
    
    if ((Close[0] > draftMA1(Close,5)))
    {
    EnterLong();
    }
    
    Got this error:-
    Operator '>' cannot be applied to operands of type 'double' and NinjaTrader.Indicator.draftMA1'

Latest Posts

Collapse

Topics Statistics Last Post
Started by mic414, Yesterday, 11:52 PM
1 response
2 views
0 likes
Last Post NinjaTrader_Jason  
Started by fmcap, Yesterday, 10:49 PM
0 responses
2 views
0 likes
Last Post fmcap
by fmcap
 
Started by iradielt, Yesterday, 10:06 PM
0 responses
2 views
0 likes
Last Post iradielt  
Started by gbajaj, Yesterday, 03:35 PM
2 responses
11 views
0 likes
Last Post gbajaj
by gbajaj
 
Started by space_trader, Yesterday, 03:19 PM
2 responses
8 views
0 likes
Last Post space_trader  
Working...
X