Hi All,
Please take a look at the latest version of PriceChannel_Stop indicator, the first version of which was developed for MT3 in 2005.
In this version I added the new important parameter - Ratchet:
- < 0 - stops follow by the channel strictly
- = 0 - stops move in one direction(similar to old versions)
- > 0 - stops follow by the channel with period of which will gradually decrease with each new HH/LL for uptrend or downtrend respectively.
This parameter can be a fractional value, for example, if it's equal 0.25 then the period will decrease every 4 HH bar for uptrend.
Code:extern int TimeFrame = 0; //TimeFrame in min extern int UpBandPrice = 2; //Upper Band Price(ex.2 for High) extern int LoBandPrice = 3; //Lower Band Price(ex.3 for Low) extern int ChannelPeriod = 9; //Channel Period (eg.9) extern double Risk = 0; //Channel Narrowing Factor(0...0.5) extern double Ratchet = 0.0; //Ratchet(-1-off,>= 0-on) extern double MoneyRisk = 1.00; //Offset Factor(eg.1.2) extern int SignalMode = 1; //SignalMode: 0-off,1-on extern int LineMode = 1; //Line mode : 0-off,1-on extern int DotMode = 1; //Dot mode : 0-off,1-on extern int BarsMode = 1; //Bars mode : 0-off,1-on extern string alerts = "--- Alerts & Emails ---"; extern int AlertMode = 0; extern int SoundsNumber = 5; //Number of sounds after Signal extern int SoundsPause = 5; //Pause in sec between sounds extern string UpSound = "alert.wav"; extern string DnSound = "alert2.wav"; extern int EmailMode = 0; //0-on,1-off extern int EmailsNumber = 1; //0-on,1-off
Regards,
Igor
Bookmarks