Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
I am not sure how I can be any more specific :(

Nasdaq spread GKFX = 1
4524.6 ~ 4525.6

Original Indicator result = 10

New Indicator setting 1 = 10

New indicator setting 0 = 10

New indicator setting 2 = 100
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
I guess I figured it out.

Download the attached version and set use_custom_decimal_places to true, and decimal_places to 0. It will output 1.0 in your case.

The previous version did not work because "0" in decimal_places meant that default pip size is used rather than that the pip should be normalized to 0 decimal places.
 

Attachments

  • Spread_Pips.mq4
    3 KB · Views: 19

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
And do what you expect to see?

When the above landed in my in-tray . . . I was worried :eek: . . . what was I missing :confused:

Fortunately after following the link I found your second reply . . . Phew

It works very well with everything I have tried it on :)

However . . . Do you remember the K.I.S.S principle ?

In my opinion it's confusing and I think it should only have 2 options available
  1. Forex . . . the original setting
  2. Non Forex . . . the NEW setting
On the above basis it hasn't been caught out . . . YET

I have tried it on 0, 1, 2, 3, 4 & 5 decimal place instruments without problem

.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
When the above landed in my in-tray . . . I was worried :eek: . . . what was I missing :confused:

Fortunately after following the link I found your second reply . . . Phew

It works very well with everything I have tried it on :)

However . . . Do you remember the K.I.S.S principle ?

In my opinion it's confusing and I think it should only have 2 options available
  1. Forex . . . the original setting
  2. Non Forex . . . the NEW setting
On the above basis it hasn't been caught out . . . YET

I have tried it on 0, 1, 2, 3, 4 & 5 decimal place instruments without problem

.
What does Forex/Non-Forex has to do with it? There are Forex pairs that some traders would like to adjust according to their idea of pip size.
 

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
Could it be that difference between Spreadbetting and conventional Trading with Lots has surfaced yet again :mad:

What I found on my limited testing was that currency pairs were quite happy with the original settings

HOWEVER
indices, commodities, stock and shares needed the alternative setting

Hence my suggestion Forex and Non Forex

.
 
Last edited:

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
Been thinking . . . like you do

There are only two options. All I am suggesting is a drop down with those two options

Simples

.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Been thinking . . . like you do

There are only two options. All I am suggesting is a drop down with those two options

Simples

.
So, you want the use_custom_decimal_places parameter to be changed from false/true to 'Forex/Non-Forex'? But that would really confuse those Forex traders that won't be satisfied with the default pip size.
 

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
I am very grateful for what you have done with the original "Spread" indicator allowing me to successfully use it with indices, commodities, stocks and shares. All I was trying to do was make it less complicated . . .

For 1 decimal place instruments you set the "decimal_places" to 0 - H'mmm that makes a lot of sense :( . . . (I don't think)

What are the settings for 2, 3, 4 or 5 decimal places then :confused:

What is custom and what is not custom - when should it be true and when should it be false ?

To me at present it's all very hit and miss trial and error with 2 inputs when it should be a simple choice . . . is it currency or is it not

One set of calculations for currency and another set of calculations for OTHER

Sorry that for whatever reason you cannot see my point I just can't make my case any more descriptive or clearer.

.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Actually, it is already very simple and does not depend on what you attach it too - currency pair, index or some stock CFD.

The indicator measures the current spread in points (pips). There is no convention as to what a pip is (even in Forex), that's why there is decimal_places parameter. Using that parameter, you can tell the indicator your idea of a pip. If you set it to 0, you tell the indicator that one pip looks like "1" - with zero decimal points. That way, a quote like 18017.7/18022.4 will result in a spread of 4.7 pip. If you set decimal_places to 1, then it means that your pip looks like "0.1" - with one decimal point. And that means that the quote above has 47 pips of spread. Furthermore, if you believe that a proper pip should look like "0.01", you will set decimal_places to 2 and the spread of the same quote would be 470.

In another example, let's consider a USD/RUB quote 51.6241/51.9459. If I want to use "0.01" as a pip, I just set decimal_places to 2 and the indicator will display the spread for that quote as 32.18.
 

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
Thank you Enivid for that excellent explanation on decimal places but could you please clarify "use_custom_decimal_places" when should it be true and when should it be false?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Thank you Enivid for that excellent explanation on decimal places but could you please clarify "use_custom_decimal_places" when should it be true and when should it be false?
If you want to set the custom pip size using decimal_places, then use_custom_decimal_places should be true.

When use_custom_decimal_places is false, the indicator will use the default pip size of the current quote. For example, it will output 47 for 18017.7/18022.4 quote and 3218 for 51.6241/51.9459 quote.
 

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
Thank you :)

I just wanted to get the why's and wherefores of using the indicator down in black and white in an effort to reduce the questions being asked of Enivid.

How do you do this . . .

How do you do that . . .

There are unfortunately so many indicators out there that only the creator knows how to effectively use to the fullest - No instructions :confused:

Once again . . . Thank you :)

.
 

Maverick

Master Trader
Apr 3, 2014
460
8
79
Bournemouth UK
All I need now is an ADR that does the same ;)

Knows where the decimal place should be

Or a combined Spread and ADR :rolleyes:

H'mmm

.
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
Would it be possible to add a 'DrawTextAsBackground' option to this indicator so that it can be joined seamlessly onto the PSC indicator please? or even if this indicator is used on its own I think it would be a good option to have.

Thank you.
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
Yeah no problem, I will keep checking back here for if/when Spread version 1.04 is released with the suggested addition.

Thanks.
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
OK so I have just got round to swapping out 1.03 with 1.04.

The only strange behaviour I have seen with this new version is the corner anchoring options.

The first four options work but not as described. For example to anchor the text to the top right corner of the chart I must choose 'Left Side's Centre'.

No biggie but I find it's helpful to report anything odd I find.
 

Attachments

  • Untitled.png
    Untitled.png
    144.2 KB · Views: 18
  • 👍
Reactions: Enivid