TMA alert, modification wanted

Post Reply
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

TMA alert, modification wanted

Post by thomasmore »

Dear all,
I use TMA-bands with an alert function, but I'd like the alert fired when the Price touches/pierces/crosses the outer band (as circled in the pic). My usual trial & error and copy/paste coding skills didn' t do the job this time, so any help would be appreciated.
Best regards,
Thomas
You do not have the required permissions to view the files attached to this post.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

TMA alert, modification wanted

Post by milanese »

thomasmore » Tue Jan 24, 2017 2:22 pm wrote:Dear all,
I use TMA-bands with an alert function, but I'd like the alert fired when the Price touches/pierces/crosses the outer band (as circled in the pic). My usual trial & error and copy/paste coding skills didn' t do the job this time, so any help would be appreciated.
Best regards,
Thomas
the attached one should do what you ask for...
TmaTrue with Distances_6xx.mq4
Cheers :)


Tommaso
You do not have the required permissions to view the files attached to this post.
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

TMA alert, modification wanted

Post by thomasmore »

Thanks Tommaso for your prompt reply !
However, the indi I send calculates StdDev of the TMA, and the indi you send plots a multiplier of the ATR.
I "my" indi, I see some values that trigger the alert (upbuffer, downbuffer) so I think changing these would get the alert on the outer bands. Appreciate I you would have a look at it.
best regards,
Thomas
You do not have the required permissions to view the files attached to this post.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

TMA alert, modification wanted

Post by milanese »

thomasmore » Tue Jan 24, 2017 5:32 pm wrote:Thanks Tommaso for your prompt reply !
However, the indi I send calculates StdDev of the TMA, and the indi you send plots a multiplier of the ATR.
I "my" indi, I see some values that trigger the alert (upbuffer, downbuffer) so I think changing these would get the alert on the outer bands. Appreciate I you would have a look at it.
best regards,
Thomas
I know your version as I modified it.., but I have no idea what you want there changed.. sorry, as it alters as intended..
an other version that gives inverse signal I attach here.. As I do not understand yiour request it is again only a try..
You do not have the required permissions to view the files attached to this post.
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
heart1010
Trader
Posts: 56
Joined: Wed Mar 30, 2016 8:33 pm

TMA alert, modification wanted

Post by heart1010 »

@thomasmore
With your indicator you get the alert when reaching the dotted lines (and not the outer band/line), correct?

Try attached modified version which should alert you when outer bands are touched.

Only changed two lines (see commented out lines)

Code: Select all

      tmBuffer[i] = iCustom(NULL,timeFrame,IndicatorFileName,"calculateTma",HalfLength,Price,BandsDeviations,0,shift1);
      upBuffer[i] = iCustom(NULL,timeFrame,IndicatorFileName,"calculateTma",HalfLength,Price,BandsDeviations,1,shift1);
      dnBuffer[i] = iCustom(NULL,timeFrame,IndicatorFileName,"calculateTma",HalfLength,Price,BandsDeviations,2,shift1);

      level=(upBuffer[i]-dnBuffer[i])*20/100; // other lines take away 20% OF DIFFERENCE IN RANGE
      
      upLevel[i] = (upBuffer[i] - level);
      dnLevel[i] = (dnBuffer[i] + level);
       //if (Bid > upLevel[0] &&Bid < upLevel[1] &&tLastAlert<Time[0])
       if (Bid > upBuffer[0] && Bid < upBuffer[1] && tLastAlert<Time[0])
      {
      
     fireAlerts(" TMA Bands "+Symbol()+" upcross  ");
            tLastAlert=Time[0];
           
      
      }
       //if (Bid < dnLevel[0] &&Bid > dnLevel[1] &&tLastAlert<Time[0])
       if (Bid < dnBuffer[0] && Bid > dnBuffer[1] && tLastAlert<Time[0])
      {
      
     fireAlerts(" TMA Bands "+Symbol()+" downcross  ");
            tLastAlert=Time[0];
           
      
      }
You do not have the required permissions to view the files attached to this post.
heart1010
Trader
Posts: 56
Joined: Wed Mar 30, 2016 8:33 pm

TMA alert, modification wanted

Post by heart1010 »

...or you can test TMA+CG mladen.mq4 version (which should be nearly the same as yours with "correct" alerts). I also added arrows.
You do not have the required permissions to view the files attached to this post.
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

TMA alert, modification wanted

Post by thomasmore »

heart1010 » 25 Jan 2017, 10:51 wrote:...or you can test TMA+CG mladen.mq4 version (which should be nearly the same as yours with "correct" alerts). I also added arrows.
That's exactely what I needed !
Thanks a lot,

Thomas
mraza
Posts: 1
Joined: Fri Aug 04, 2023 7:01 am

Re: TMA alert, modification wanted

Post by mraza »

Hi Thomas, would it be please possible to add push alerts for mobile to this indicator. will much appreciate. thanks in advance.

Regards

Malik
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

Re: TMA alert, modification wanted

Post by thomasmore »

mraza wrote: Mon Aug 07, 2023 12:47 am Hi Thomas, would it be please possible to add push alerts for mobile to this indicator. will much appreciate. thanks in advance.

Regards

Malik
Hi mraza, I found this indicator on another forum (long time ago), and since I am not a coder, Iasked for assistance here on SHF. So ,sorry, I can't be of any help to you.
Cheers,
thomasmore
Post Reply

Return to “Coders Hangout”