Pips Profit Alert

User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

Wonder if any coder will be willing to try their hands at an indicator that will give an alert when a set number of profit pips has been hit for a particular pair.

For instance, if I had say 4 or 5 trades going for GU, when the total profit in pips reaches a set level, the alert will go off specifying that the set level has been reached. The indi could also display on the chart the total pips in profit for the pair, as well as the total profit in currency.

I suspect there could already exist an indi like this. If you know of it please give a shout.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Pips Profit Alert

Post by milanese »

Pedigree » Mon May 19, 2014 10:09 am wrote:Wonder if any coder will be willing to try their hands at an indicator that will give an alert when a set number of profit pips has been hit for a particular pair.

For instance, if I had say 4 or 5 trades going for GU, when the total profit in pips reaches a set level, the alert will go off specifying that the set level has been reached. The indi could also display on the chart the total pips in profit for the pair, as well as the total profit in currency.

I suspect there could already exist an indi like this. If you know of it please give a shout.
Take a look here http://www.forexfactory.com/showthread. ... ost7403504

Cheers :)

Tommaso
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
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

Thanks Tommaso but this is not quite it. This gives an alert at a set amount of profit in cash. I would like the alert to go off for a set amount of profit in pips.

Also, all the trades on the chart do not have to be in profit before the alert sounds. The alert will sound as soon as the set amount in pips is reached, even if this is from just one of several trades of the pair. So, the chart display should only show the pips total in profit (and cash) for the pair, meaning that the figures displayed will ALWAYS either be zero or positive.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Pips Profit Alert

Post by milanese »

Pedigree » Mon May 19, 2014 10:56 am wrote:Thanks Tommaso but this is not quite it. This gives an alert at a set amount of profit in cash. I would like the alert to go off for a set amount of profit in pips.

Also, all the trades on the chart do not have to be in profit before the alert sounds. The alert will sound as soon as the set amount in pips is reached, even if this is from just one of several trades of the pair. So, the chart display should only show the pips total in profit (and cash) for the pair, meaning that the figures displayed will ALWAYS either be zero or positive.
Ok here you find a modified version, use FilterBySymbol true and it shpows only the profit for the actual pair you have it attached, Use_Profit_PipsAlert set this to true, and it will give you alerts if the PipsForProfitAlert is reached, it shows too a negativ profit (loss), but this is no problem and imo better than a zero showing....
mn_show_profit_alerts.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
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

milanese » Mon May 19, 2014 12:24 pm wrote: Ok here you find a modified version, use FilterBySymbol true and it shpows only the profit for the actual pair you have it attached, Use_Profit_PipsAlert set this to true, and it will give you alerts if the PipsForProfitAlert is reached, it shows too a negativ profit (loss), but this is no problem and imo better than a zero showing....

Cheers :)

Tommaso
This is great Tommaso - just what the doctor ordered!!! Thank you sooo much.

It's no longer working in 509 though. I still do all my compiling in the 509 editor. If it won't be too much trouble, could you please make it 509-compatible?

And BTW, as a coder, you'll probably know better but won't it save a lot of back-and-forth to just make all indis and EAs usable in all builds?

Thanks a lot.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Pips Profit Alert

Post by milanese »

Pedigree » Mon May 19, 2014 12:01 pm wrote:
milanese » Mon May 19, 2014 12:24 pm wrote: Ok here you find a modified version, use FilterBySymbol true and it shpows only the profit for the actual pair you have it attached, Use_Profit_PipsAlert set this to true, and it will give you alerts if the PipsForProfitAlert is reached, it shows too a negativ profit (loss), but this is no problem and imo better than a zero showing....

Cheers :)

Tommaso
This is great Tommaso - just what the doctor ordered!!! Thank you sooo much.

It's no longer working in 509 though. I still do all my compiling in the 509 editor. If it won't be too much trouble, could you please make it 509-compatible?

And BTW, as a coder, you'll probably know better but won't it save a lot of back-and-forth to just make all indis and EAs usable in all builds?

Thanks a lot.
Please redownload I made some change now it should work perfect with both builds..

Cheers :)

Tommaso
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
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

milanese » Mon May 19, 2014 1:13 pm wrote: Please redownload I made some change now it should work perfect with both builds..

Cheers :)

Tommaso
That's super Tommaso!
Thanks ever so much.
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

Tommaso, on looking through the code, I find that this will not work as desired.

The condition for the pips alert is this:

Code: Select all

if (Use_Profit_PipsAlert==true)//milanese
   {
    if(tLastAlert<Time[0]&& profitpips>=PipsForProfitAlert)//milanese
     {...........
But profitpips is the sum total of ALL orders rather than the total of only the orders in profit.

Apologies if I did not explain myself clearly enough, but please consider the following scenario in which I have 5 orders of say GU.

Order 1 -100 pips
Order 2 -80 pips
Order 3 -30 pips
Order 4 +50 pips
Order 5 +52 pips

If I set PipsForProfitAlert at 100 pips, I will not get an alert because profitpips will have a value of -108. BUT I should get an alert because the sum of orders 4 and 5 have exceeded my PipsForProfitAlert.

This is really ONLY about the orders in profit. This is why I said earlier that the pips display should only show the sum of the profit pips, so that it is always either zero or positive.

If you can spare the time, please take a look at it again.

Thank you.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Pips Profit Alert

Post by milanese »

Pedigree » Mon May 19, 2014 1:54 pm wrote:Tommaso, on looking through the code, I find that this will not work as desired.

The condition for the pips alert is this:

Code: Select all

if (Use_Profit_PipsAlert==true)//milanese
   {
    if(tLastAlert<Time[0]&& profitpips>=PipsForProfitAlert)//milanese
     {...........
But profitpips is the sum total of ALL orders rather than the total of only the orders in profit.

Apologies if I did not explain myself clearly enough, but please consider the following scenario in which I have 5 orders of say GU.

Order 1 -100 pips
Order 2 -80 pips
Order 3 -30 pips
Order 4 +50 pips
Order 5 +52 pips

If I set PipsForProfitAlert at 100 pips, I will not get an alert because profitpips will have a value of -108. BUT I should get an alert because the sum of orders 4 and 5 have exceeded my PipsForProfitAlert.

This is really ONLY about the orders in profit. This is why I said earlier that the pips display should only show the sum of the profit pips, so that it is always either zero or positive.

If you can spare the time, please take a look at it again.

Thank you.
Find it attached if you set ShowOnlyTradesWithPositivProfit it show only the addition of trades in this pair that are in profit..
mn_show_profit_alerts.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
User avatar
Pedigree
Trader
Posts: 226
Joined: Thu Apr 11, 2013 12:09 pm
Location: Buckinghamshire, UK

Pips Profit Alert

Post by Pedigree »

milanese » Mon May 19, 2014 4:16 pm wrote:
Find it attached if you set ShowOnlyTradesWithPositivProfit it show only the addition of trades in this pair that are in profit..

Cheers :)

Tommaso
Now, this is exactly right, Tommaso.
Thank you very much.
Post Reply

Return to “Indicators”