작업 종료됨
명시
Indicator change/update:
ST Indicator (Supertrend Indicator)
I would like to add/change functionality in the attached Supertrend Indicator.
(1) Add Buy/Sell Signal- It should be visual on chart as Green or Red Arrow and it should produce this signal (Buy/Sell)
The attached source code only have calculated Supertrend Value that represent Green and Red line. We need to add Arrow as shows in below site picture. This indicator freely available with Arrow but the file is EX4 not MQ4 so we are going to add this Green or Red Arrow or Signal info in the provided MQ4 source code.
More Info available here: https://www.marketcalls.in/metatrader/non-repainting-supertrend-indicator-with-sound-and-popup-alerts.html
Free Supertrend file with Signal is available at below link in EX4 format this is for your reference only.
https://www.marketcalls.in/wp-content/uploads/2012/12/Supertrend-V1.1-Alert-Marketcalls.ex4_.zip
(2) Add alerts (screen, push, and email)
Three alerts options when it produce the signal or write new signal info in to text file
(3) Create Empty text file with naming format of “Symbol_Signal”
When the indicator loaded on chart it will write/produce TEXT file with name of “Symbol_Signal” in MQL4/Files directory. See the attached sample file.
(4) Write generated signal info into the TEXT file as per provided format
When the Buy or sell signal generated, it will write buy/sell signal info in specific format as per attached. (Date/Time; Indicator name; Symbol name; BUY or SELL; Price;)
Please note that only last signal info will be remain in TEXT file. As soon as the new signal generated it will delete any previous signal info and add this new signal info in TEXT file.
(5) Order Management- Add SL % and TP % option so it can manage trade
Example (1) : The symbol CADUSD has created Buy Signal at 100 price and the trade executed.
SL% set in parameter is 1% and
TP% set in parameter is 3%
Now with this SL and TP parameter the indicator is monitoring the current price. So Let’s say the price is hitting 99 that means the 1% of SL of the last order price is reached and the order should be square off by producing opposite signal (SELL) and order closed by booking 1% loss.
Let’s say the current price is reached 103 (3% of TP means 100 last order price and 3% of 100 that is 103) so the indicator square off by producing opposite signal (SELL) and order closed by booking 3% profit.
If any above scenario is not happened and let’s say Supertrend produce reverse Signal (SELL) it will produce write this SELL signal info in TEXT file with provided format with adding extra word “double” (In short, if any trade is running and supertrend produce opposite signal, it will write the extra word “double”)
(6) Order Management- Add Re-entry value option with SL and TP for Re-entry
Once the SL or TP reached, and there are no running trade, it will monitor the Supertrend Value and if the Supertrend value and current price match the condition, it will create another order based on Supertrend direction.
Please load the MQ4 or EX4 file on Metatrader and you will see RED/GREEN line that is the value of Supertrend if you touch that line with Mouse, it will give you the value of Supertrend. Now let’s say the value of Supertrend is 100 and there are no running trade at this point.
The Re-entry value is define 1% of the supertrend value.
What is going to happen, when there are no running trade and the value of Supertend is less than 1% of the range (means if the current price is between 99-100 or 100-101 it will produce new order based on current trend either Buy or Sell.
This will be treated again Re-entry SL or TP same as the regular order.
Example- No running trade, the trend is Buy and supertrend value is 100 and Re-entry parameter value is 1%
Indicator produce Buy signal as soon as the price touch less than 101 and write this signal info in to the text file and follow the TP & SL for Re-entry.
If any SL or TP scenario is not happened and let’s say Supertrend produce reverse Signal (SELL) it will write this SELL signal info in TEXT file with provided format with adding extra word “double” (In short, if any trade is running and supertrend produce opposite signal, it will write the extra word “double”)
(7) Order Management- No new trade after custom time (e.g. 1:00 PM IST) only exit the position if any open.
(8) It has input parameter that give you an options to shows profit/lost points from the last order on visual chart.