Menu

Voice Alerts & Sound Effects in DAS Trader Pro

Sounds Search:
https://pixabay.com/sound-effects/search/

Sounds used in this video and code:

Order Fill
order-fill-store-scanner-beep-90395.mp3
https://pixabay.com/sound-effects/90395/

Sell Loss
loss_error-126627.mp3
https://pixabay.com/sound-effects/126627/

Sell Profit
sell_bid_cash-register-141427.mp3
https://pixabay.com/sound-effects/141427/

Move Stop
move-stop-error-9-206494.mp3
https://pixabay.com/sound-effects/206494/

Scalp Tail KEY/BUTTON
scalp-trail-key-level-up-02-199574.mp3
https://pixabay.com/sound-effects/199574/

Auto Trail
trail-universfield-level-up-06-370051.mp3
https://pixabay.com/sound-effects/370051/

 

Add simple speech or sound to your scripts using:

PlaySound(“mysound.mp3”);
(NOTE: Place the sound files in the c:\<your DAS folder>\)

Speak(“Test 123”);

 



The script(s) featured in this episode are provided below for educational and reference purposes. Trading stocks, options, futures, and other financial instruments involves substantial risk of loss and is not suitable for all investors. You may lose some or all of your invested capital. Always review and thoroughly test any code in a simulator before using it in a live trading environment.

This video is provided by YouTube. It is blocked until you accept functional cookies.

OBJECT_LOAD_TIME
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//OBJECT_LOAD_TIME
if (GetVar("$TIME")==0) $TIME=0;
if (!IsObj($TIME)) $TIME = newUserObj();

$TIME.SECONDS = GetSecond();
$TIME.TIME_MINUTES_SECONDS = $TIME.SECONDS / 60;
$TIME.TIME_MINUTES = Round($TIME.TIME_MINUTES_SECONDS,0);
$TIME.ONLY_SECONDS = $TIME.SECONDS - (($TIME.TIME_MINUTES - 1) * 60);
$TIME.TIME_HOURS=$TIME.SECONDS/3600;
if ($TIME.TIME_HOURS > 9.5 && $TIME.TIME_HOURS < 16) {
    $TIME.REGULAR_HOURS=1;
} else {
    $TIME.REGULAR_HOURS=0;
}

//BUG
if ($TRADE.OVERRIDE_REPLAY == 1){
    $TIME.REGULAR_HOURS = $TRADE.OVERRIDE_REGHOURS;
}

//Bar Objects
$bar0 = $chart_1m.GetBar(0);
$bar1 = $chart_1m.GetBar(-1);
$bar2 = $chart_1m.GetBar(-2);
$bar3 = $chart_1m.GetBar(-3);
$bar4 = $chart_1m.GetBar(-4);
$bar5 = $chart_1m.GetBar(-5);
$bar6 = $chart_1m.GetBar(-6);
$bar7 = $chart_1m.GetBar(-7);
$bar8 = $chart_1m.GetBar(-8);

if (GetVar("$TIME.DATETIME_BAR0")==0)  $TIME.DATETIME_BAR0 = "";//+ ADDED THIS LINE
$LAST_DATETIME_BAR0 = $TIME.DATETIME_BAR0;

$TIME.DATETIME_BAR0=SubString($bar0.Time, 0, 4) + "/" + SubString($bar0.Time, 4, 6) + "/" + SubString($bar0.Time, 6, 8) + " " + SubString($bar0.Time, 9, 19);
$TIME.DATETIME_BAR1=SubString($bar1.Time, 0, 4) + "/" + SubString($bar1.Time, 4, 6) + "/" + SubString($bar1.Time, 6, 8) + " " + SubString($bar1.Time, 9, 19);
$TIME.DATETIME_BAR2=SubString($bar2.Time, 0, 4) + "/" + SubString($bar2.Time, 4, 6) + "/" + SubString($bar2.Time, 6, 8) + " " + SubString($bar2.Time, 9, 19);
$TIME.DATETIME_BAR3=SubString($bar3.Time, 0, 4) + "/" + SubString($bar3.Time, 4, 6) + "/" + SubString($bar3.Time, 6, 8) + " " + SubString($bar3.Time, 9, 19);
$TIME.DATETIME_BAR4=SubString($bar4.Time, 0, 4) + "/" + SubString($bar4.Time, 4, 6) + "/" + SubString($bar4.Time, 6, 8) + " " + SubString($bar4.Time, 9, 19);
$TIME.DATETIME_BAR5=SubString($bar5.Time, 0, 4) + "/" + SubString($bar5.Time, 4, 6) + "/" + SubString($bar5.Time, 6, 8) + " " + SubString($bar5.Time, 9, 19);
$TIME.DATETIME_BAR6=SubString($bar6.Time, 0, 4) + "/" + SubString($bar6.Time, 4, 6) + "/" + SubString($bar6.Time, 6, 8) + " " + SubString($bar6.Time, 9, 19);
$TIME.DATETIME_BAR7=SubString($bar7.Time, 0, 4) + "/" + SubString($bar7.Time, 4, 6) + "/" + SubString($bar7.Time, 6, 8) + " " + SubString($bar7.Time, 9, 19);
$TIME.DATETIME_BAR8=SubString($bar8.Time, 0, 4) + "/" + SubString($bar8.Time, 4, 6) + "/" + SubString($bar8.Time, 6, 8) + " " + SubString($bar8.Time, 9, 19);

SPEAK_TEXT
(NEW)
(This script was introduced in this episode)

//SPEAK_TEXT

if ($MISC.SPEAK_TEXT  != ""){
    Speak($MISC.SPEAK_TEXT , $MISC.SOUND_DEVICE, "SHARE STOP");
    $MISC.SPEAK_TEXT  = "";
}

OBJECT_INIT_MISC
(NEW)
(This script was introduced in this episode)

//OBJECT_INIT_MISC
$MISC = newUserObj();
$MISC.SPEAK_TEXT = "";
$MISC.SOUND_DEVICE = "Speaker";//Speaker Headphones Remote
$MISC.SOUND_FILE = "";

//Draw the button with default setting
if (IsObj($DASHBOARD.getCustButObj("SoundButton"))){
    $DASHBOARD.getCustButObj("SoundButton").Text = $MISC.SOUND_DEVICE;
}

BUTTON_SOUND
(NEW)
(This script was introduced in this episode)

//BUTTON_SOUND
if (IsObj($DASHBOARD.getCustButObj("SoundButton"))){
    if ($MISC.SOUND_DEVICE == "Headphones"){
        $MISC.SOUND_DEVICE = "Speaker";
        $DASHBOARD.getCustButObj("SoundButton").Text = "Speaker";
    } else if ($MISC.SOUND_DEVICE == "Speaker"){
        $MISC.SOUND_DEVICE = "Remote Audio";
        $DASHBOARD.getCustButObj("SoundButton").Text = "Remote";
    } else {
        $MISC.SOUND_DEVICE = "Headphones";
        $DASHBOARD.getCustButObj("SoundButton").Text = "Headphones";
    }
}

INIT
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//INIT
$chart_1m = GetWindowObj("chart1m");
$chart_daily = GetWindowObj("chartd");
$chart_60_min = GetWindowObj("chart_60_min");

$DASHBOARD = GetWindowObj("DASHBOARD");//+ ADDED THIS LINE
//$DASHBOARD = 0;//+ REMOVED THIS LINE

$montage_window = GetWindowObj("montage_window");
ExecHotkey("OBJECT_INIT_TRADE");
ExecHotkey("OBJECT_INIT_MISC");//+ ADDED THIS LINE
$ACCOUNT_NUMBER = "YOUR_ACCOUNT_NUMBER_HERE";

BLOCKED_STOCK_ADD
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//BLOCKED_STOCK_ADD
LoadVarFromFile("C:\\dtc\\temp\\blocked_stocks.txt");
if (GetVar("$BLOCKED_STOCKS")==0) $BLOCKED_STOCKS="";

$TMP_BLOCKED_STOCKS_CHECK = $BLOCKED_STOCKS;
$TMP_BLOCKED_STOCKS = "";

while (strlen($TMP_BLOCKED_STOCKS_CHECK) > 2){
    $this_comma = StrFind($TMP_BLOCKED_STOCKS_CHECK, ",");
    if ($this_comma > 0){
        $this_item = SubString($TMP_BLOCKED_STOCKS_CHECK, 0, $this_comma);
        $TMP_BLOCKED_STOCKS_CHECK = SubString($TMP_BLOCKED_STOCKS_CHECK, $this_comma + 1, strlen($TMP_BLOCKED_STOCKS_CHECK));
    } else {
        $this_item = $TMP_BLOCKED_STOCKS_CHECK;
        $TMP_BLOCKED_STOCKS_CHECK = "";
    }
    if ($this_item != $montage_window.SYMBOL){
        if ($TMP_BLOCKED_STOCKS == ""){
            $TMP_BLOCKED_STOCKS = $this_item;
        } else {
            $TMP_BLOCKED_STOCKS = $TMP_BLOCKED_STOCKS + "," + $this_item;
        }
    }
}

$BLOCKED_STOCKS = $TMP_BLOCKED_STOCKS;

if ($BLOCKED_STOCKS == ""){
    $BLOCKED_STOCKS = $montage_window.SYMBOL;
} else {
    $BLOCKED_STOCKS = $BLOCKED_STOCKS + "," + $montage_window.SYMBOL;
}

$MISC.SPEAK_TEXT = $MISC.SPEAK_TEXT + ", BLOCKED " + $montage_window.SYMBOL;//+ ADDED THIS LINE

MsgLog("ADD:" + $montage_window.SYMBOL);


$VARIABLE_NAME = "BLOCKED_STOCKS";
$FILE_NAME = "blocked_stocks";
//+ UPDATED THE FOLLOWING TO BE ON 1 LINE
ShellExec("powershell.exe", "-ExecutionPolicy Bypass -File C:\\dtc\\das_save_setting.ps1 \"" + $BLOCKED_STOCKS + "\" \"" + $VARIABLE_NAME + "\" \"" + $FILE_NAME + "\"", "C:\\dtc\\temp\\");


$TRADE.BLOCK_THIS_STOCK = 1;

BLOCKED_STOCK_REMOVE
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//BLOCKED_STOCK_REMOVE
LoadVarFromFile("C:\\dtc\\temp\\blocked_stocks.txt");
if (GetVar("$BLOCKED_STOCKS")==0) $BLOCKED_STOCKS="";

$TMP_BLOCKED_STOCKS_CHECK = $BLOCKED_STOCKS;
$TMP_BLOCKED_STOCKS = "";

while (strlen($TMP_BLOCKED_STOCKS_CHECK) > 2){
    $this_comma = StrFind($TMP_BLOCKED_STOCKS_CHECK, ",");
    if ($this_comma > 0){
        $this_item = SubString($TMP_BLOCKED_STOCKS_CHECK, 0, $this_comma);
        $TMP_BLOCKED_STOCKS_CHECK = SubString($TMP_BLOCKED_STOCKS_CHECK, $this_comma + 1, strlen($TMP_BLOCKED_STOCKS_CHECK));
    } else {
        $this_item = $TMP_BLOCKED_STOCKS_CHECK;
        $TMP_BLOCKED_STOCKS_CHECK = "";
    }
    if ($this_item != $montage_window.SYMBOL){
        if ($TMP_BLOCKED_STOCKS == ""){
            $TMP_BLOCKED_STOCKS = $this_item;
        } else {
            $TMP_BLOCKED_STOCKS = $TMP_BLOCKED_STOCKS + "," + $this_item;
        }
    }
}
$TRADE.BLOCK_THIS_STOCK = 0;
$BLOCKED_STOCKS = $TMP_BLOCKED_STOCKS;

$MISC.SPEAK_TEXT = $MISC.SPEAK_TEXT + ", BLOCK " + $montage_window.SYMBOL + " REMOVED";//+ ADDED THIS LINE
MsgLog("REMOVED:" + $montage_window.SYMBOL );//+ UPDATED THIS LINE

$VARIABLE_NAME = "BLOCKED_STOCKS";
$FILE_NAME = "blocked_stocks";

//+ UPDATED THE FOLLOWING TO BE ON 1 LINE
ShellExec("powershell.exe", "-ExecutionPolicy Bypass -File C:\\dtc\\das_save_setting.ps1 \"" + $BLOCKED_STOCKS + "\" \"" + $VARIABLE_NAME + "\" \"" + $FILE_NAME + "\"", "C:\\dtc\\temp\\");


TIMER
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//TIMER
ExecHotkey("OBJECT_LOAD_TIME");
if ($TRADE.TIME_ON_TICKER > 2 && $TRADE.DAILYEMA200 == 0){
    //EMA200 comes from daily chart
    ExecHotkey("EMA200");
}

if (GetVar("$LAST_DATETIME_BAR0")==0) $LAST_DATETIME_BAR0="";
if ($LAST_DATETIME_BAR0 != $TIME.DATETIME_BAR0){
    ExecHotkey("STOCK_RESET");
}
ExecHotkey("OBJECT_LOAD_TICKER");

ExecHotkey("ANALYZE_MACD");
ExecHotkey("DASHBOARD");
ExecHotkey("TIMER_PL_UPDATE");
ExecHotkey("TIMER_BUY_TARGET");
ExecHotkey("TIMER_TRAILING_STOP_AUTO");
ExecHotkey("CHART_TIMER_DRAW_BUY_TARGET");
ExecHotkey("CHART_TIMER_DRAW_AUTO_TRAILING");
ExecHotkey("TIMER_HEARTBEAT");
ExecHotkey("SPEAK_TEXT");//+ ADDED THIS LINE

//$LAST_DATETIME_BAR0 = $TIME.DATETIME_BAR0;//+ REMOVED THIS LINE

ORDER_FILL
(NEW)
(This script was introduced in this episode)

//ORDER_FILL
//Add this file to an alert event of Order Fill in DAS
//Watch video - Voice Alerts & Sound Effects in DAS Trader Pro

$order = GetOrderObj("Last");

if (IsObj($order)){
    if ($order.Side == "S"){
        //SELLING
        //Sound in TIMER_PL_UPDATE for Sell based on profit/loss

    } else if ($order.Side == "B"){
        //BUYING
        PlaySound("order-fill-store-scanner-beep-90395.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");

    }
}

TIMER_PL_UPDATE
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//TIMER_PL_UPDATE
$ACCOUNT=GetAccountObj($ACCOUNT_NUMBER);

ExecHotkey("CHART_TIMER_DRAW_STOP");
ExecHotkey("TRACK_TRADES_ACTIVE");

if ($TRADE.STOP.TRIGGER > 0 && $montage_window.POS > 0){
    //wait 2 seconds to trigger stop
    if ($TRADE.STOP.TRIGGER > 2){
        ExecHotkey("SELL_STOP");
    }
    $TRADE.STOP.TRIGGER = $TRADE.STOP.TRIGGER + 1;
}

//calculate profit or loss on last trade
if ($ACCOUNT.Realized != $TRADE.LAST_PL && $TRADE.LAST_PL != 1234){
	$TRADE.LAST_GAIN_LOSS = $ACCOUNT.Realized - $TRADE.LAST_PL;
	$TRADE.LAST_PER_SHARE = 0;
	if ($TRADE.LAST_SHARES > 0){
		$TRADE.LAST_PER_SHARE = Round(($TRADE.LAST_GAIN_LOSS / $TRADE.LAST_SHARES), 2);
		MsgLog("Per Share: " + $TRADE.LAST_PER_SHARE);
	}

	if ($ACCOUNT.Realized < $TRADE.LAST_PL){
		//LOSS
      	    $tmp_var_name = "$loss" + $chart_1m.SYMBOL;
            if (GetVar($tmp_var_name)==0) SetVar($tmp_var_name, 0);

            $this_symbol_loss = GetVar($tmp_var_name);
            $this_symbol_loss = $this_symbol_loss + 1;
            SetVar($tmp_var_name, $this_symbol_loss);
            if ($this_symbol_loss > 2){
		        Speak($this_symbol_loss + " Losses " + $chart_1m.SYMBOL);
            }
        PlaySound("loss_error-126627.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE
	} else {
		//GAIN
        PlaySound("sell_bid_cash-register-141427.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE
	}

    ExecHotkey("TRACK_TRADES_LAST");

}

//Update PL
$TRADE.LAST_PL = $ACCOUNT.Realized;
if (IsObj($montage_window)){
	$TRADE.LAST_AVERAGE = $montage_window.AVGCost;
	$TRADE.LAST_SHARES = $montage_window.POS;
}

//detect current stock losses and block if 3
$tmp_var_name = "$loss" + $chart_1m.SYMBOL;
if (GetVar($tmp_var_name)==0) SetVar($tmp_var_name, 0);
$this_symbol_loss = GetVar($tmp_var_name);
if (IsObj($DASHBOARD.getCustButObj("STOCK_BLOCKED"))){
	if ($this_symbol_loss > 2 || $TRADE.BLOCK_THIS_STOCK == 1){
		$DASHBOARD.getCustButObj("STOCK_BLOCKED").Text = "BLOCKED";
		$DASHBOARD.getCustButObj("STOCK_BLOCKED").BkColor = Color("Red");
	} else {
		$DASHBOARD.getCustButObj("STOCK_BLOCKED").Text = "";
		$DASHBOARD.getCustButObj("STOCK_BLOCKED").BkColor = Color("Gray");
	}
}

TIMER_TRAILING_STOP_AUTO
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//TIMER_TRAILING_STOP_AUTO

//make sure dashboard shows current settings
if (IsObj($DASHBOARD.getCustButObj("auto_trail_amount"))){
    $DASHBOARD.getCustButObj("auto_trail_amount").Text = $TRADE.TRAILING_AUTO_AMOUNT;

    if (IsObj($DASHBOARD.getCustButObj("auto_trail_onoff"))){
        if ($TRADE.TRAILING_AUTO_ON_OFF == 1){
            $DASHBOARD.getCustButObj("auto_trail_onoff").Text = "ON";
            $DASHBOARD.getCustButObj("auto_trail_onoff").BkColor = Color("Green");
        } else {
            $DASHBOARD.getCustButObj("auto_trail_onoff").Text = "OFF";
            $DASHBOARD.getCustButObj("auto_trail_onoff").BkColor = Color("Gray");
        }
    }
}

//check if in position and need to set auto stop
if ($TRADE.TRAILING_AUTO_ON_OFF == 1 && $TRADE.TRAILING_AUTO_AMOUNT > 0){
    if ($montage_window.POS > 0){
        if ($montage_window.ASK > ($montage_window.AVGCost + $TRADE.TRAILING_AUTO_AMOUNT)){
            $shares_to_sell = $montage_window.POS;//+ ADJUSTED THIS LINE
            $price_to_sell = $montage_window.ASK - $TRADE.TRAILING_AUTO_AMOUNT;
            $price_to_sell = Round($price_to_sell, 2);

            $MISC.SOUND_FILE = "trail-universfield-level-up-06-370051.mp3";//+ ADDED THIS LINE
            ExecHotkey("SELL_TRAILING_EXECUTE");
        }
    }
}

SELL_TRAILING_EXECUTE
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//SELL_TRAILING_EXECUTE

if ($TRADE.TRAILING_PROFIT_PRICE < $price_to_sell){
    if ($montage_window.POS > 0 && $montage_window.BID > $montage_window.AVGCost){

        $TRADE.TRAILING_PROFIT_PRICE = $price_to_sell;

        $montage_window.TradeWndStyle=Stop;
        $montage_window.SYMBOL=$chart_1m.SYMBOL;
        $montage_window.Price=$price_to_sell - $TRADE.TRAILING_PROFIT_SPREAD;
        $montage_window.StopPrice=$price_to_sell;
        $montage_window.Route="STOP";
        if ($TIME.REGULAR_HOURS == 1){
            $montage_window.StopType="Limit";
        } else {
            $montage_window.StopType="LimitP";
        }
        $montage_window.Share=$shares_to_sell;

        $montage_window.ACCOUNT=$ACCOUNT_NUMBER;
        $montage_window.TIF=DAY+;

        $checkOrder = GetOrderObj("Last");
        if (IsObj($checkOrder)){
            if ($checkOrder.Status == "Accepted" && $checkOrder.Side == "S" && $checkOrder.SYMBOL == $chart_1m.SYMBOL){
                $montage_window.Replace;
                MsgLog("Replace");
            } else {
                MsgLog("Sell Trailing");
                $montage_window.CXL ALLSYMB SELL;
                $montage_window.SELL=SEND;
            }
        } else {
            MsgLog("Sell Trailing 2");
            $montage_window.CXL ALLSYMB SELL;
            $montage_window.SELL=SEND;
        }
        PlaySound($MISC.SOUND_FILE, $MISC.SOUND_DEVICE, "SHARE STOP");//+ UPDATED THIS LINE
    }
}

SELL_TRAILING_MIDDLE
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//SELL_TRAILING_MIDDLE

$shares_to_sell = $montage_window.POS;//+ ADJUSTED THIS LINE
$price_to_sell = $montage_window.AVGCost + (($montage_window.ASK - $montage_window.AVGCost) * 0.5);
$price_to_sell = Round($price_to_sell, 2);

$MISC.SOUND_FILE = "scalp-trail-key-level-up-02-199574.mp3";//+ ADDED THIS LINE
ExecHotkey("SELL_TRAILING_EXECUTE");

SELL_TRAILING_TOP
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//SELL_TRAILING_TOP

$shares_to_sell = $montage_window.POS;//+ ADJUSTED THIS LINE
$price_to_sell = $montage_window.AVGCost + (($montage_window.ASK - $montage_window.AVGCost) * 0.75);
$price_to_sell = Round($price_to_sell, 2);

$MISC.SOUND_FILE = "scalp-trail-key-level-up-02-199574.mp3";//+ ADDED THIS LINE
ExecHotkey("SELL_TRAILING_EXECUTE");

STOP_BAR0
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//STOP_BAR0

//set static stop
$TRADE.STOP.STATIC_LEVEL = $bar0.Lo;
$TRADE.STOP.LAST_VALUE = 0;
PlaySound("move-stop-error-9-206494.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE

STOP_BAR1
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//STOP_BAR1

//set static stop
$TRADE.STOP.STATIC_LEVEL = $bar1.Lo;
$TRADE.STOP.LAST_VALUE = 0;
PlaySound("move-stop-error-9-206494.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE

STOP_BAR2
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//STOP_BAR2

//set static stop
$TRADE.STOP.STATIC_LEVEL = $bar2.Lo;
$TRADE.STOP.LAST_VALUE = 0;
PlaySound("move-stop-error-9-206494.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE

STOP_05_ADD
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//STOP_05_ADD

if ($TRADE.STOP.STATIC_LEVEL > 0){
    //if static level set - maintain level
    if ($montage_window.POS > 0){
        $TRADE.STOP.FLEX_LEVEL = $montage_window.AVGCost - $TRADE.STOP.STATIC_LEVEL;
    } else {
        $TRADE.STOP.FLEX_LEVEL = $montage_window.ASK - $TRADE.STOP.STATIC_LEVEL;
    }
}

//set floating stop
$TRADE.STOP.FLEX_LEVEL = $TRADE.STOP.FLEX_LEVEL + 0.05;

//clear static stop
$TRADE.STOP.STATIC_LEVEL = 0;
$TRADE.STOP.LAST_VALUE = 0;
PlaySound("move-stop-error-9-206494.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE

STOP_05_SUBTRACT
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//STOP_05_SUBTRACT

if ($TRADE.STOP.STATIC_LEVEL > 0){
    //if static level set - maintain level
    if ($montage_window.POS > 0){
        $TRADE.STOP.FLEX_LEVEL = $montage_window.AVGCost - $TRADE.STOP.STATIC_LEVEL;
    } else {
        $TRADE.STOP.FLEX_LEVEL = $montage_window.ASK - $TRADE.STOP.STATIC_LEVEL;
    }
}

//set floating stop
$TRADE.STOP.FLEX_LEVEL = $TRADE.STOP.FLEX_LEVEL - 0.05;

//catch negative
if ($TRADE.STOP.FLEX_LEVEL < 0){
    $TRADE.STOP.FLEX_LEVEL = 0;
}

//clear static stop
$TRADE.STOP.STATIC_LEVEL = 0;
$TRADE.STOP.LAST_VALUE = 0;
PlaySound("move-stop-error-9-206494.mp3", $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADDED THIS LINE

DETECT_STOCK_COUNTRY
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//DETECT_STOCK_COUNTRY

$TRADE.COUNTRY_ALERT = "";
$TRADE.COUNTRY = "";
$TRADE.COUNTRY_BGCOLOR = "Gray";
$TRADE.COUNTRY_FGCOLOR = "Black";
$TX = $chart_1m.SYMBOL;

if ($TX == "AACG" || $TX == "AAPG" || $TX == "ABLV" || $TX == "ABLVW" || $TX == "ABTS" || $TX == "ADAG" || $TX == "AEHL" || $TX == "AHG" || $TX == "AIFU" || $TX == "AIHS" || $TX == "AIOS" || $TX == "AIXI" || $TX == "AMBO" || $TX == "API" || $TX == "ASPC" || $TX == "ASPCR" || $TX == "ASPCU" || $TX == "ATAT" || $TX == "ATGL" || $TX == "ATHM" || $TX == "ATXG" || $TX == "AZI" || $TX == "BABA" || $TX == "BAOS" || $TX == "BDMD" || $TX == "BDMDW" || $TX == "BEKE" || $TX == "BGIN" || $TX == "BGM" || $TX == "BIDU" || $TX == "BILI" || $TX == "BIYA" || $TX == "BNR" || $TX == "BON" || $TX == "BTCT" || $TX == "BVC" || $TX == "BYAH" || $TX == "BZ" || $TX == "BZUN" || $TX == "CAAS" || $TX == "CAN" || $TX == "CANG" || $TX == "CBAT" || $TX == "CCG" || $TX == "CCM" || $TX == "CD" || $TX == "CDTG" || $TX == "CGTL" || $TX == "CHA" || $TX == "CHR" || $TX == "CHSN" || $TX == "CLPS" || $TX == "CMCM" || $TX == "CNET" || $TX == "CNEY" || $TX == "CNTB" || $TX == "COE" || $TX == "CPHI" || $TX == "CPOP" || $TX == "CREG" || $TX == "DAO" || $TX == "DOGZ" || $TX == "DOYU" || $TX == "DQ" || $TX == "DSY" || $TX == "DSYWW" || $TX == "DTSS" || $TX == "DUO" || $TX == "DXST" || $TX == "EBON" || $TX == "ECX" || $TX == "EDTK" || $TX == "EDU" || $TX == "EH" || $TX == "EHGO" || $TX == "EJH" || $TX == "ELOG" || $TX == "ELPW" || $TX == "EPOW" || $TX == "EZGO" || $TX == "FAMI" || $TX == "FENG" || $TX == "FLX" || $TX == "FTFT" || $TX == "FVN" || $TX == "FVNNU" || $TX == "GDHG" || $TX == "GDS" || $TX == "GMHS" || $TX == "GMM" || $TX == "GOTU" || $TX == "GRNQ" || $TX == "GSUN" || $TX == "GTEC" || $TX == "GURE" || $TX == "HAO" || $TX == "HCAI" || $TX == "HERE" || $TX == "HKIT" || $TX == "HLP" || $TX == "HSAI" || $TX == "HTHT" || $TX == "HTT" || $TX == "HUDI" || $TX == "HUHU" || $TX == "HUIZ" || $TX == "HXHX" || $TX == "ICG" || $TX == "IFBD" || $TX == "INLF" || $TX == "IQ" || $TX == "ITOC" || $TX == "ITP" || $TX == "IZM" || $TX == "JD" || $TX == "JDZG" || $TX == "JEM" || $TX == "JF" || $TX == "JFIN" || $TX == "JFU" || $TX == "JG" || $TX == "JKS" || $TX == "JLHL" || $TX == "JWEL" || $TX == "JXG" || $TX == "JYD" || $TX == "JZ" || $TX == "JZXN" || $TX == "KC" || $TX == "KNDI" || $TX == "KRKR" || $TX == "KXIN" || $TX == "LBGJ" || $TX == "LGCL" || $TX == "LGHL" || $TX == "LHSW" || $TX == "LI" || $TX == "LICN" || $TX == "LITB" || $TX == "LOBO" || $TX == "LOT" || $TX == "LOTWW" || $TX == "LSE" || $TX == "LU" || $TX == "LX" || $TX == "LXEH" || $TX == "LZMH" || $TX == "MAAS" || $TX == "MASK" || $TX == "MATH" || $TX == "MNSO" || $TX == "MOMO" || $TX == "MTC" || $TX == "MTEN" || $TX == "NA" || $TX == "NAAS" || $TX == "NAMI" || $TX == "NBP" || $TX == "NCT" || $TX == "NCTY" || $TX == "NEGG" || $TX == "NIU" || $TX == "NOAH" || $TX == "NPT" || $TX == "NTCL" || $TX == "NTES" || $TX == "NWGL" || $TX == "NXTT" || $TX == "OCG" || $TX == "ORIS" || $TX == "PAVS" || $TX == "PDD" || $TX == "PETZ" || $TX == "PLAG" || $TX == "PN" || $TX == "POM" || $TX == "PONY" || $TX == "QFIN" || $TX == "QH" || $TX == "RAYA" || $TX == "RCON" || $TX == "RDAC" || $TX == "RDACR" || $TX == "RDACU" || $TX == "RDGT" || $TX == "RETO" || $TX == "RYET" || $TX == "SCAG" || $TX == "SCAGW" || $TX == "SEED" || $TX == "SFWL" || $TX == "SJ" || $TX == "SNTG" || $TX == "SOGP" || $TX == "SOHU" || $TX == "SOS" || $TX == "STAK" || $TX == "STFS" || $TX == "SXTC" || $TX == "SY" || $TX == "TAL" || $TX == "TANH" || $TX == "TC" || $TX == "TCOM" || $TX == "THCH" || $TX == "TIGR" || $TX == "TOUR" || $TX == "TROO" || $TX == "TUYA" || $TX == "UBXG" || $TX == "UCAR" || $TX == "UPC" || $TX == "UTSI" || $TX == "UXIN" || $TX == "VIOT" || $TX == "VIPS" || $TX == "VNET" || $TX == "VSA" || $TX == "WAFU" || $TX == "WAI" || $TX == "WB" || $TX == "WETH" || $TX == "WETO" || $TX == "WIMI" || $TX == "WNW" || $TX == "WOK" || $TX == "WRD" || $TX == "WTG" || $TX == "WTGUR" || $TX == "WTGUU" || $TX == "WTO" || $TX == "WXM" || $TX == "WYHG" || $TX == "XHG" || $TX == "XNET" || $TX == "XPEV" || $TX == "YAAS" || $TX == "YB" || $TX == "YDKG" || $TX == "YI" || $TX == "YIBO" || $TX == "YJ" || $TX == "YMM" || $TX == "YMT" || $TX == "YOUL" || $TX == "YQ" || $TX == "YRD" || $TX == "YSG" || $TX == "YSXT" || $TX == "YXT" || $TX == "ZBAO" || $TX == "ZCMD" || $TX == "ZEPP" || $TX == "ZH" || $TX == "ZJK" || $TX == "ZJYL" || $TX == "ZKIN" || $TX == "ZLAB" || $TX == "ZTO" || $TX == "ZYBT" ){
    $TRADE.COUNTRY_ALERT = "CHINA STOCK , BE CAREFUL";
    $TRADE.COUNTRY = "CHINA";
    $TRADE.COUNTRY_BGCOLOR = "Red";
    $TRADE.COUNTRY_FGCOLOR = "White";
}

if ($TRADE.COUNTRY_ALERT != ""){
    //Set to Speaker or Headphones - can create a button to toggle
    Speak($TRADE.COUNTRY_ALERT, $MISC.SOUND_DEVICE, "SHARE STOP");//+ ADJUSTED THIS LINE
    if (IsObj($DASHBOARD)){
        if (IsObj($DASHBOARD.getCustButObj("COUNTRY"))){
            $DASHBOARD.getCustButObj("COUNTRY").BkColor = Color($TRADE.COUNTRY_BGCOLOR);
            $DASHBOARD.getCustButObj("COUNTRY").FgColor = Color($TRADE.COUNTRY_FGCOLOR);
            $DASHBOARD.getCustButObj("COUNTRY").Text = $TRADE.COUNTRY;
        }
    }
} else {
//+ ADJUSTED THESE LINES

    if (IsObj($DASHBOARD)){
        if (IsObj($DASHBOARD.getCustButObj("COUNTRY"))){
            $DASHBOARD.getCustButObj("COUNTRY").BkColor = Color($TRADE.COUNTRY_BGCOLOR);
            $DASHBOARD.getCustButObj("COUNTRY").FgColor = Color($TRADE.COUNTRY_FGCOLOR);
            $DASHBOARD.getCustButObj("COUNTRY").Text = "";
        }
    }
}

OBJECT_LOAD_TICKER
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//OBJECT_LOAD_TICKER

$SYMBOL_DATA = GetQuoteObj($chart_1m.SYMBOL);
$TRADE.FLOAT = $SYMBOL_DATA.Float;

//+ ADJUSTED THESE LINES
if (GetVar("$bar0")==0){
    $TRADE.CHANGE_PERCENT = 0;
} else {
    $TRADE.CHANGE_PERCENT = Round(((($bar0.Close - $SYMBOL_DATA.yClose) / $SYMBOL_DATA.yClose) * 100),2);
}

$TRADE.EMA9 = $chart_1m.getStudyVal("EMA9");
$TRADE.EMA20 = $chart_1m.getStudyVal("EMA20");
$TRADE.EMA50 = $chart_1m.getStudyVal("EMA50");
$TRADE.VWAP = $chart_1m.getStudyVal("VWAP");


ExecHotkey("TIMER_LOAD_TICKER_VOLUME");
ExecHotkey("TIMER_STOCK_RVOLS");
ExecHotkey("TIMER_DRAW_RATING_BUTTONS");
ExecHotkey("TIMER_RATE_STOCK");

CHART_TIMER_DRAW_STOP
This script is from a previous episode. Changes have been marked in the file so you can follow what was adjusted in this episode.

//CHART_TIMER_DRAW_STOP
if (($TRADE.STOP.FLEX_LEVEL > 0 || $TRADE.STOP.STATIC_LEVEL > 0) && $montage_window.BID > 0){
    if ($TRADE.STOP.LAST_VALUE != $TRADE.STOP.VALUE || $TRADE.STOP.LAST_VALUE == 0 || $TRADE.STOP.FLEX_LEVEL > 0  ){
        if ($montage_window.POS == 0){
            //not in a trade (BID or ASK up to you / spread)
            $TRADE.STOP.VALUE = $montage_window.BID - $TRADE.STOP.FLEX_LEVEL;
        } else {
            //in a trade
            $TRADE.STOP.VALUE = $montage_window.AVGCost - $TRADE.STOP.FLEX_LEVEL;
        }

        if ($TRADE.STOP.STATIC_LEVEL > 0){
            $TRADE.STOP.VALUE = $TRADE.STOP.STATIC_LEVEL;
        }

        if (IsObj($chart_1m.GetTrendline("StopText"))){
            $chart_1m.GetTrendline("StopText").Delete();
        }
        if (IsObj($chart_1m.GetTrendline("StopLine"))){
            $chart_1m.GetTrendline("StopLine").Delete();
        }

        //RISK TEXT FROM SHARES DASHBOARD BUTTON
        $shares_to_buy = Round($DASHBOARD.getCustButObj("SHARES").Text,0);
        if ($montage_window.POS == 0){
            $risk_value = Round((($montage_window.ASK - $TRADE.STOP.VALUE)*$shares_to_buy),2);
        } else {
            $risk_value = Round((($montage_window.AVGCost - $TRADE.STOP.VALUE)*$shares_to_buy),2);
        }
        $risk_text = $shares_to_buy + " Shares ($-" + $risk_value + ")";

        $chart_1m.CreateTrendline("HorizLine, Price=" + $TRADE.STOP.VALUE + ", Name=StopLine, LineStyle=DashDotLine, LineWidth=5, Color=#FF0000, LabelTextColor=#000000, LabelBGColor=#FF0000");

        $chart_1m.ConfigTrendLine Text DashLine:0,0,0:1:255,0,0:255,255,255;
        $chart_1m.CreateTrendline("Text, Price=" + $TRADE.STOP.VALUE + ", Price1=" + ($TRADE.STOP.VALUE) + ", Time=" + $TIME.DATETIME_BAR0 + ",  Time1=" + $TIME.DATETIME_BAR8 + ", Transparency=-162, Fill=1, Name=StopText, LineStyle=2, LineColor=#FF0000, LineWidth=1, Text=" + $risk_text);


    }
} else {
    //delete line if no stop set
    if (IsObj($chart_1m.GetTrendline("StopText"))){
        $chart_1m.GetTrendline("StopText").Delete();
    }
    if (IsObj($chart_1m.GetTrendline("StopLine"))){
        $chart_1m.GetTrendline("StopLine").Delete();
    }
    $TRADE.STOP.VALUE = 0;
}
if ($TRADE.STOP.LAST_VALUE != $TRADE.STOP.VALUE){
    ExecHotkey("SELL_STOP");
}

if (IsObj($DASHBOARD.getCustButObj("StopPrice"))){
    $DASHBOARD.getCustButObj("StopPrice").Text = " " + $TRADE.STOP.VALUE;
}
//+ ADDED THESE LINES
if (IsObj($DASHBOARD.getCustButObj("StopCents"))){
    if ($TRADE.STOP.STATIC_LEVEL == 0){
        $DASHBOARD.getCustButObj("StopCents").Text = " " + $TRADE.STOP.FLEX_LEVEL;
    } else {
        $DASHBOARD.getCustButObj("StopCents").Text = " ---";
    }
}

$TRADE.STOP.LAST_VALUE = $TRADE.STOP.VALUE;



Disclaimer: This is an independent project and is not affiliated with or endorsed by DASTrader.com.

The tool is currently under development and intended for educational and experimental purposes only, including improving the experience of working with DAS hotkey scripting (e.g., code validation, highlighting, and structure).

It does not execute trades, provide trading signals, or offer financial advice. Any scripts created or used with DAS Trader remain the sole responsibility of the user.

Trading involves significant risk. You are fully responsible for verifying all scripts, commands, and behavior before using them in a live trading environment.

This tool is provided “as-is” with no guarantees of accuracy, completeness, or reliability. Use at your own risk. Always test thoroughly in a simulator before live trading.




More Videos

DISCLAIMER

Episode: Voice Alerts & Sound Effects in DAS Trader Pro

The DAS Trader Pro scripts, code examples, tools, and information provided on this website are offered solely for educational and informational purposes. Nothing on this website constitutes financial, investment, legal, tax, or trading advice.

Trading stocks, options, futures, and other financial instruments involves substantial risk of loss and is not suitable for all investors. You may lose some or all of your invested capital.

No representation or warranty is made regarding the accuracy, completeness, reliability, profitability, or suitability of any script, strategy, indicator, automation, workflow, or method presented on this website.

Execution behavior may vary based on broker, routing, market data, platform configuration, DAS Trader Pro version, account settings, market conditions, and other factors beyond the control of DayTradeCoder.

Past performance, examples, demonstrations, screenshots, or historical results are not indicative of future results and should not be relied upon as a guarantee of performance.

You are solely responsible for reviewing, understanding, testing, validating, and monitoring all code before use. All scripts should be thoroughly tested in a simulator or paper-trading environment prior to any live trading activity.

Viewing Scripts For Episode: Voice Alerts & Sound Effects in DAS Trader Pro

You are requesting access to the script associated with this video. This acknowledgment applies only to this script.

USE AT YOUR OWN RISK.

We value your privacy

We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.

Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. Detailed information about cookies is available below.

Required for basic site functionality.