Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simplest say to determine if SMA1 is above/ below SMA2

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

    Simplest say to determine if SMA1 is above/ below SMA2

    Hi - for NT8 - I would like to find a way to test if SMA1 is above or below SMA2 with 1) each SMA using the same input series --- e.g. 15 minute chart as input for both SMAs..
    2) each SMA using a different input series --- e.g. 200 tick and 1000 tick --- 1 minute and 5 range, etc.

    Thanks for any help or examples.
    Last edited by seeseea; 06-20-2020, 03:51 PM.

    #2
    Hi seeseea, thanks for your question.

    The SampleMACrossover strategy sets up two SMA objects and checks if they cross above or below each other. If you have additional data series, we have a guide on multi time frame scripts here:


    Instead of setting up both the SMA objects on BarsArray[0], initialize the second SMA with BarsArray[1] e.g.

    Code:
    else if (State == State.DataLoaded)
                {
                    smaFast = SMA(BarsArray[0],Fast); 
                    smaSlow = SMA(BarsArray[1], Slow);
    Please let me know if I can assist any further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    71 views
    0 likes
    Last Post PaulMohn  
    Working...
    X