| |||||||
| |||||||
MT-4 free source code
This is a discussion on MT-4 free source code within the Free Systems forums, part of the Mechanical & Systems Trading category; if anybody wants an alert-type thing using RSI or Stochastics, here is something I did, and have been using on ...
![]() |
| |||
|
| | LinkBack | Thread Tools |
| | #1 |
| Legendary Member | MT-4 free source code
if anybody wants an alert-type thing using RSI or Stochastics, here is something I did, and have been using on MT-4. NB: Bar-0 is current bar. Bar-1 is last bar, Bar-2 is bar before that. (ie, it counts backwards) It looks for OverSold and OverBought conditions on RSI and Stochastics. (if you dont one of them you "comment them out" by putting "//" in front of the line.) what it does is see if the indicator has "hooked" beyond the user-defined values. eg; on RSI, if Upper value is 80, it will give you an alert if the last closed bar (Bar-1) is lower than the bar before AND the bar-before (Bar-2) was above 80. This means the price has hooked down after rising above the threshold value of 80. similar for Lower values, except the indicator value has to hook upwards after being below the threshold. this concept is also applied to Stochastics. the Alert shows: the currency pair being alerted. eg, GBPUSD the time-frame on which it triggered, eg, 5 (means on 5-min chart) a short-code for the event. eg, RSI-OB, RSI-OS, STX-OB, STX-OS. the date/time it happened, chart-time. NB: this can be different from PC-time, due to brokers, etc. the CLOSE price of last closed bar. eg, 2.0244 the indicator values changing. eg, 18.50 >> 21.5. (this means the indicator hooked from 18.5 on Bar-2, and was 21.5 on last bar, showing indicator is hooking up) the alert is by no means perfect, but has removed the psychological element of trying to dither over best-price of when to place a trade, and also takes me away from the screen, reducing over-analysis, and just letting the trade get on with it. also, the alert acts as a reminder to come and check progress. ultimately, it is only an aid, and the trader must press the buy and sell buttons themselves. EDIT: first screen-shot shows the user-interface entering the triggering parameters, eg, RSI value, and the Upper and Lower levels that trigger an alert. similarly for Stochastics lower down in same frame. second screen-shot shows what the alerts display on the screen. (these can also be sent via SMS to a mobile.) The attached file, x_RSI_Stochs.txt needs to be saved to the indicators directory, and saved as x_RSI_Stochs.mq4.
__________________ If the only tool you have is a hammer, you tend to see every problem as a nail - Abraham Maslow There are 10 kinds of people in the world; those that understand binary, and those that dont. -Anon Warning: May contain nuts. Last edited by trendie; Dec 14, 2007 at 10:49am. |
| |
| | #2 |
| Legendary Member |
Pin-Bar noddy indicator.shows bars where body size (Open-to-Close) is 25% or less of bar-size (High-to-Low). if the open/close of the small body falls within the top 25% it is flagged as bullish. (blue diamond) if the open/close of the small body falls within the bottom 25% it is flagged as bearish. (red diamond) if the open/close of the small body falls within the middle 50% it is flagged as spinning-top. (white diamond. Yeah, I know, useles if blackground is white!) for some reason the flags reduce in size if recompiled onto the chart. so, best to close the chart and reload. NB: the PinBar.txt needs to be renamed as PinBar.mq4 and compiled. Did it just for fun! EDIT: added a sample GBPUSD screen. EDIT2: the indicator does not guarantee that you will make money, and is for educational purposes only. Please seek independant financial advice before blowing money on pretty patterns.
__________________ If the only tool you have is a hammer, you tend to see every problem as a nail - Abraham Maslow There are 10 kinds of people in the world; those that understand binary, and those that dont. -Anon Warning: May contain nuts. Last edited by trendie; Jan 1, 2008 at 9:59am. |
| |
| | #3 | |
| Guest | Quote:
Does this RSI/STOCH indicator draw the red & blue circles on the charts, as shown in your screenshot? or did you add the red/blue circles manually? Should the MQL code work properly from the .txt file without any further modifications when added to an indicator? I saved the code from the .txt file to an indicator, but am not getting the stochastic on the sub chart, and am not getting the red & blue circles Thanks a lot. EDIT: The sooner T2W allows the uploading of metatrader4 files - the better Last edited by JTrader; Jan 1, 2008 at 1:05pm. | |
| |
| | #4 |
| Legendary Member |
hi JT,the indicator doesnt show the red and blue circles! those are "demark trend" circles. (I use them to show me recent swing-highs and swing-lows, and if they congregate at certain prices, they show me potential sup/res points). they are nothing to do with the RSI indicator I added. the screen-shot really was meant to illustrate the format of the alerts, not my chart set-up! all it does is take the ordinary RSI indicator and add alerts when the values hook for RSI. I then piggy-back the Stochastics alerts only. It doesnt show the stochastics at all - just the alert. the alert is a short-hand for things I look for. Ideally I should have an alert for the RSI and Stochs separately, but that doesnt interest me. the .txt needs only to be renamed .mq4 and compiled once there.
__________________ If the only tool you have is a hammer, you tend to see every problem as a nail - Abraham Maslow There are 10 kinds of people in the world; those that understand binary, and those that dont. -Anon Warning: May contain nuts. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| could it be....a trading platform source code for 5k...AWESOME. | yari123 | Mechanical & Systems Trading | 3 | Oct 25, 2007 2:14am |
| Looking for free, real time AD line source | herringtrader | Indices | 0 | May 31, 2006 3:24am |
| New To Site? | Need Help? |
| Special Offers for T2W Members* | ||||
|---|---|---|---|---|
| 30 Free Trades in 30 Days | Free Special Report | Low Rates from $1.50/contract | | |
| * Offers open to new clients only. ** Just enter promotional code T2W100 when opening an account. T&Cs Apply. | ||||
All times are GMT -4. The time now is 6:27pm.
Copyright © 2001-2009 Trade2Win Ltd







Pin-Bar noddy indicator.
