Jump to content
Medved Trader Forums

Percentage from a moving average.


Recommended Posts

Hi,
How do I create a scan that just alerts me when price is above the SMA50 and just 8% away from tagging it?  The percentage part I believe requires me to enter the advance mode and I don't know C#. Using the rule editor is really easy with the drop downs but no % option - thanks for any help

 

Link to comment
Share on other sites

btw, lets say after you convert, result is something like this:
 

public void MainCalculation()
{
    if (Close > EMA_Line)
    {
        SetColorAndShape("NearEMA", PBShape.Default, 0xFFFF4EBB);
        TriggerAlert("NearEMA");
        SetScanResult(@"NearEMA");
    }
}

to make it so it alerts when the price is 8% below the EMA, you just change the IF statement to be
if (Close > EMA_Line * 0.92)
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...