Jump to content
Medved Trader Forums

Recommended Posts

Posted

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

 

Posted

Make a rule-based scan for price above SMA50. Then convert it to advanced. That will generate the C# code. Then you modify it to your taste.

 

I am not sure what you mean by "8% away from tagging it". 8% is huge in stock-price terms :)

  • Thanks 1
Posted

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

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.

×
×
  • Create New...