TradingView
jason5480
May 28, 2022 10:33 AM

Two MA Signal Indicator 

Bitcoin / TetherUSBinance

Description

This Signal Indicator that emits a signal based on two MAs crossover/crossunder. It is designed to be used as an External Input for "Template Trailing Strategy" to verify the correctness of the External Deal Condition Mode of the aforementioned script and the Internal Strategy logic. Also, this script is a simple example on how to create custom signal indicators that can be "pugged" to the "Template Trailing Strategy" and get all the features this strategy script can provide!

Release Notes

  • Minor refactoring

Release Notes

  • The convention that is demonstrated for this signal indicator is the following: The signal is a two digit integer. The second digit (the one on the left) is the channel of communication for the long deals and the first digit is the channel of communication for the short deals. To be more specific if the digit of the channel is 2 you start and if it is 1 you end the deal otherwise you do nothing. So the possible values are 20 (start long), 10 (end long), 02 (start short), 01 (end short), 00 (no operation), 21 (end short and start long), 12 (end long and start short). This approach has the advantage that you can pass information both for longs and shorts in the same bar. The user of this input may use the integer division and modulo by 10 to extract each digit and get signal for both channels
  • Change default fastMA color

Release Notes

  • Edit last comment to refer to the correct possible values of the signal

Release Notes

  • Set minimum value to MA length

Release Notes

  • Added trend filters into the indicator logic
  • Now indicator also can emit cancelation signals to inform the "Template Trailing Strategy" that should cancel any existing unfiled stop-limit orders
  • Draw the signals using external_input_utils library that also TTS uses to decode the signals

Release Notes

  • The ema now use security in a "secure" way so it does not repaint in higher timeframes in real-time bars...

Release Notes

  • Update exernal_input_utils library

Release Notes

  • Add alerts for start end and cancel signals.

Release Notes

  • Minor refactoring checking #region feature

Release Notes

  • Show the actual signal value in the status line and data window

Release Notes

  • Refactor to make it easier to copy-paste the Signal region to create your own signal indicator

Release Notes

Update internal libraries. Use the datagram library to compose the signal.

Release Notes

Refactor and update internal libraries

Release Notes

Update internal libraries

Release Notes

  • Update internal library "two_ma_logic" and add "series_collection"
Comments
Bongkeng
super
JulesV
Great stuff! I use this as a template to build a custom indicator, and mainly, I'm using its extensive logic to feed customisable signals into @jason5480's other brilliant script: "Template Trailing Strategy."
jason5480
Yes this serves as a great signal indicator template too! Thank you @JulesV for your kind words.
samuelnuamah
Nice Work
jason5480
@samuelnuamah, Thanks enjoy!
gmeneguzzo
Jason , truly I cannot understand the purpose of End Deals , Cancel Start Deals and Cancel End Deals , probably I'm too old I'm still tied to open long/close long and open short / close short . Do I guess if you have a youtube channel where you explain how do they work ?
gmeneguzzo
@gmeneguzzo, and really no idea how to set this section ibb.co/DYf0yZj , really no idea.
gmeneguzzo
@gmeneguzzo, and I have seen this ibb.co/V0FKmqG , is it normal that TTS and TV open the trade in 2 separate candles (TV open 1 candle later) .
jason5480
@gmeneguzzo, It is normal it is not one candle later it is some seconds. The signal is "finalized" and emitted at the bar close. The market order is executed at the next bar open.
jason5480
@gmeneguzzo, If your signal script is based on this script then you will not need to change the convention. This tells on TTS how to decompose the signal and get the pieces of information it needs. It is recommended to use the default there.
More