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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X