Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculating difference between SMA and Last Close in Market Analyzer

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

    Calculating difference between SMA and Last Close in Market Analyzer

    I want to create a simple indicator in Market Analyzer. Any suggestions please?

    - I would like to calculate difference between SMA(200, Close) to previous candle close price (example: 60 min candle close).
    - I do not need to plot on chart. Only on Market Analyzer.
    - I would like to do this for multiple Forex pairs and compare how each market basket is strong or weak overall.

    I searched around and couldn't quite find anything similar. I would appreciate any feedback.

    Thank you,

    #2
    Hello totoro2000,

    Thank you for the post.

    I wanted to check, have you currently tried something that is not working? If so can you provide what you have tried?

    To create an indicator for the Market Analyzer, you would need to create an indicator that has a Plot and then Plot a value. The Value you plot could be a calculated value such as the difference between the SMA and the Close[1] if you want, the plot is just needed for the Market Analyzer indicator column.

    For a simple way to get started, I would likely suggest using the indicator wizard to generate a new indicator with 1 plot. After doing this, you could plot the following for a difference of what you noted:

    Code:
    if(CurrentBar < 1) return;
    double diff = SMA(200)[0] - Close[1];
    Value[0] = diff;
    After creating the indicator and compiling, you could use it in the market analyzer with the Indicator column selecting the plot you created.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    571 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X