Jump to content
Medved Trader Forums

Super Trend Color and Sound Alerts

Recommended Posts

Hi Jerry....

Been playing around with the Super Trend indicator and have set up color alerts for long and short which works. I used ChatGPT to try and add sound files by directing to the sound path file on my C drive but kept getting error messages. 

I used the simple paintbar interface using all >= crossing up etc but the sound alerts were inconsistent or kept repeating throughout the signal. I know there is an option for time cleared but is it possible to have only one sound alert at the start of each signal? Here is the code currently with the color alerts which work. Is it possible for you to update the code allowing for sound file alerts ? 



Chat GPT summarized what I want ;)

A sound alert should play only once when each signal (Short or Long) occurs.
The sound alert should trigger when the SuperTrend changes from Short to Long or from Long to Short, 
and it should not repeat until the opposite signal occurs.
The color alerts portion of this requirement has been successfully implemented. 
However, implementing sound alerts, especially the part about playing a sound only once per signal change, 
might require specific functionality or support from Medved Trader, as it can depend on their scripting environment and capabilities.


Thanks a lot. 


public void MainCalculation()
    if (SuperTrend_Short > EMA_Line) { // Supertrend is above EMA Line (Short signal)
          SetColor(SysColor.MainIndicator3); // Set color to Red
    } else if (SuperTrend_Short < EMA_Line) { // Supertrend is below EMA Line (Long signal)
          SetColor(SysColor.MainIndicator2); // Set color to Green


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.

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...