Having different alert/sound for signal_Buy and signal_Sell

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Having different alert/sound for signal_Buy and signal_Sell

Postby SuperTrader » Fri May 21, 2010 3:35 am

Hi all ! :) Does please anyone know if and how we can assign a sound file to play when the 'Buy' alert of a signal occurs and a different sound file when the 'Sell' alert of the same sugnal occurs ? i.e. for the built-in MarketScope RSI signal feature, a sound when RSI crosses 70 and a different sound when RSI crosses 30. :shock:

OK, maybe for the RSI specially this can be done by doing a 'split' with the parameters by using two separate signals instances, but what about all the other signals (in general for all signals I mean, how having separated system alerts for buy/sell respective actions ?) :?:

Many thanks in advance guys :)
User avatar
SuperTrader
 
Posts: 84
Joined: Thu May 20, 2010 12:52 pm
Location: Europe

Re: Having different alert/sound for signal_Buy and signal_Sell

Postby Nikolay.Gekht » Fri May 21, 2010 9:55 am

The signal it's the only thigh which is responsible for playing the sound.

So, all what you need is to add an additional parameter for the sound file and then change the sound file playing option.

It did this for the RSI signal:
1) renamed RSI.lua and RSI.lua.rc into RSI1.lua and RSI1.lua.rc and copied them to the "C:\Program Files\CandleWorks\FXTS2\Strategies\Custom\" folder.
2) added a new parameter, so, now there is two sound file parameters - for sell and for buy signals.
3) found all SoundFile variables in lua code and rename to SoundFileSell and SoundFileBuy
4) provided to text for these parameters in English, Russian and French (sorry, I don't know all other languages :-))

Indicator:
rsi1.lua
(2.99 KiB) Downloaded 805 times

Resources:
rsi1.lua.rc
(9.87 KiB) Downloaded 804 times
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Having different alert/sound for signal_Buy and signal_Sell

Postby SuperTrader » Sat May 22, 2010 4:12 am

wow ! :) thank you very much Nikolay ! ... I'll give it a go ;) I'll also follow your guideline for a few more signals I'd like to separate buy/sell events for, but how do I edit these two files, do I need a C++ editor/compiler for that ? :shock:
User avatar
SuperTrader
 
Posts: 84
Joined: Thu May 20, 2010 12:52 pm
Location: Europe

Re: Having different alert/sound for signal_Buy and signal_Sell

Postby Nikolay.Gekht » Sun May 23, 2010 3:18 pm

but how do I edit these two files, do I need a C++ editor/compiler for that ?

You can use any text editor to do it, even notepad.

You do not need any compiler. The lua is interpreter, so you don't need to do any activities except described above.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC


Return to Discussions

Who is online

Users browsing this forum: No registered users and 4 guests