std_y=iStdDev(0,0,14,0,MODE_EMA,PRICE_CLOSE-1,14);
- You never used that indicator years ago because it never worked (as posted.)
- Tell me what price are you taking the standard deviation of?
- You never used that indicator years ago because it never worked (as posted.)
- Tell me what price are you taking the standard deviation of?
Thanks for your response
I used the squeeze indicator(co created with a friend, you can find a thread on it called pivot point squeeze) in the word doc when IG Markets charting package was with IT Finance.
All MT4 attachments are new.
regarding MT4;
the goal is to create an indicator that looks for volatility movements similar to the break of the bbw in the squeeze.
i was trying to set the condition
that the period just closed has a range (ATR for current bar or (high - low) or abs(open-close)) that is 2.5 standard deviations greater than the 'range' of the previous 14 bars. std_y was supposed to define a moving average of standard deviations of the last 14 bars from the previous bars perspective. The current bar will then be compared to it.
This conditions identify the strength and then the defining difference for long/short is price direction
2.5 and 14 etc have just been chosen and are subject to change. At this time I'm really just struggling with the macro programming of what Im trying to achieve
thanks again for you response and I hope you got the answers you were expecting
I asked one, very simple question - about one, very specific line of code. And you failed to answer it.
In that code it is the previous bar's close
sorry mate, also addressed your first statement as I wasn't very clear in the initial post.
In that code it is the previous bar's close
Nope, you are using . . .
PRICE_CLOSE - 1
. . . PRICE_CLOSE is equal to 0 so you are trying to use a price constant of -1 which doesn't exist. When you have a problem with your code you should read the documentation for the function where you think you have the issue, in this case iStdDev()

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all
I'm tryi g to program a custom indicator on MT4 that I used to use years ago on IT finance
I have tried to simplify it from using bollinger bandwidths to considering price standard deviations and ATR's.
Trouble is that my coding skills are only one day old...
I have managed to get one indicator to work but it is not satisfactory in what it is producing. I have enclosed the old indicators literature and my recent 2 mt4 attempts
your assistance would be appreciated
Cheers