OptionMaster Wrote: ------------------------------------------------------- > Can i get help with adding sound alerts and window > pop up when targets are hit on this study script Add this code to the end of your script Alert(Crosses(close, TH, CrossingDirection.ABOVE), "Target high crossed",alert.bar,Sound.Ring); Alert(Crosses(close, TL, CrossingDirection.BELOW), &quby rigel - Trading Discussion
OptionMaster You can send me the code by Private message. rgds Rigelby rigel - Trading Discussion
OptionMaster I don't have the wolf script. You need to post it and then I could add the alerts.by rigel - Trading Discussion
Optionmaster You have made several questions but sorry, they are not clear. QuoteOptionmaster does the wolf wave have audio alert when entry signal triggers ? if not could one be added to this study I am trying this script on the SPX, don't seem to work. any ideas. Thank you not getting open white line, Trade line 1. For the wolf wave you need to post the code, then probabby rigel - Trading Discussion
Taurean Not sure what you want to achieve. This is what I see: You have TWO scripts merged: One for plotting the stochastic and other for the fractal thing. Now they are both plotted in a lower panel because of the instruction declare lower; Then you have an scale problem: the fractal part will have the values of the stock price while the stochastic willl have its normal small valby rigel - Trading Discussion
OptionMaster Wrote: ------------------------------------------------------- does the wolf wave have audio alert when entry signal triggers ? if not could one be added to this study Code?by rigel - Trading Discussion
Chillic15 Short answer: The displace you see is in the: def displacement = (-length / 2) + 1; To eliminate the displacement simply replace that with: def displacement = 0; Long answer: If you read Hurst book, you will learn that he explains in detail that every MA is lagging, and the lag is half of the period. That means that in reality you will never know what is the correspondingby rigel - Trading Discussion
As far as I know there are only two ways to use the vwap link 1. a continuous MA of price x volume That is actually a weighted MA in which the weight is the volume. 2. Same calculation as above but the MA is reset every predefined period (the one is TOS) Obviously, if you want to reset 10, 15, 25 or whatever day it would be necessary to build that vwap "variable" to reset accorby rigel - Trading Discussion
Quotetrying to trade Looking to see if MVWAP is useful. Anyone experienced with it? I wanted to play with it but cannot find it in ToS. Looks like you need to calculate the VWAP which ToS does then average it over say 10 days Not sure what you call MVWAP.... the vwap is in TOS and you can set it to reset daily, weekly and monthly.by rigel - Trading Discussion
to Chillic15 I guess the displacement is in the code not shown. So, you need too post the whole code. To all: I won't be able to answer questions when the code is missing.by rigel - Trading Discussion
QuoteTaz I can't code the part in bold red. Buy Criteria 1. Aapl 5ema crosses 15 ema on 15 min Chart. (this was the easy part lol) 2. Spy currently trading above 10 ema on 15 min chart. Assuming you are working with the chart of Aapl, then you need to have a reference to SPY to create the ema and the rest of your conditions. First modify your input price=close; statement by this:by rigel - Trading Discussion
Quoteash I want to add a filter to scanning stock which is ( greater than .0007). Not sure what you are trying to achieve... your code is: plot pp=ATR(14)/close >0.0007; Now, think about it, you are dividing the ATR by the price and that ratio has to be greater than a very small number... so practically any stock complies that, you will have a lot of "hits" The other cby rigel - Trading Discussion
solewind Try this, I haven't tested it but seems doing the job with the flag input length = 21; input price = close; input ATRs=1; input trueRangeAverageType = AverageType.WILDERS; def flag; def EMA = ExpAverage(close, length); def shift1 = ATRs * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length); def neg = EMA - shift1; def pos = EMA + shift1; def Trigby rigel - Trading Discussion
Quotesolewind The problem with my script is that it only green those bars which meet the closed price condition, as soon as price closed within the ATR range, they all go blue. I see that in your logic there are two situations: 1.- Triggering of color change (you have that criteria right) 2.- Once the color change has been triggered, it needs to apply a second criteria (that is missing)by rigel - Trading Discussion
Hi It is very difficult to help when the complete code is not posted. I have tried before to answer questions without code, only to hear that the answer didn't work. There are several reasons for that, among them: the question is not clear enough or the logic of the code is wrong. So I won't be able to answer questions when the code is missing.by rigel - Trading Discussion
alexguate Please notice that when you use negative values like in EMA[-1] you are looking for one bar in the future... therefore your signals will appear late. EMA[0] means ema at current bar.... EMA[1] is EMA of previous barby rigel - Trading Discussion
Quoteralph53 If X triggers at 10:00 and again at 10:10 what I'm looking to do is calculate storelow(10:00) - storelow(10:10) def mylows= if x then Low else milows[1]; def difference=mylows-mylows[1];by rigel - Trading Discussion
Sherwin your definition is not right: def crossing = close > ema; crossing will have all the times that the Close is higher than ema, not just when in crosses. That is why you are getting very big counts You should use for example: def crossing= close crosses above ema;by rigel - Trading Discussion
Ralph53 The question is not clear. the line: def storeLow = if X then open else storeLow[1]; Does not store the value of X . It checks the condition X if positive then assign to storeLow the Open value of the bar, otherwise assign to storeLow its previous value.by rigel - Trading Discussion
trying to trade Wrote: ------------------------------------------------------- Quote I have a plot of symbol price verses the SPX in TOS. As far as I know TOS doesn't plot volume of indexes (SPX,NDX,RUT,etc)by rigel - Trading Discussion
Quotestyx But I just can't figure out how to use the addcloud in the code to color from the indicator line to baseline, when line is above and below the baseline. Styx the help in your TOS is your best friend: AddCloud AddCloud ( IDataHolder data1, IDataHolder data2, CustomColor color1, CustomColor color2); Default values: color1: Color.YELLOW color2: Color.RED Plots a translucent cby rigel - Trading Discussion
Styx Thanks for your kind words. 2 an4 I see what you mean. You can see how to change the color of the line in my previous post to Kevin. Use assignvalueColor, that would change the color of the indicator line. Then use addcloud between the line and BaseLine. Experiment with it until you master it.by rigel - Trading Discussion
Kevin, try this # OBV Oscillator # @author LazyBear # # # Adapted to TOS by Rigel, 2018 declare lower; input length=20; def OBV = TotalSum(Sign(close - close[1]) * volume); plot obv_osc = (OBV - expAverage(OBV,length)); plot zero=0; obv_osc.assignvalueColor(if obv_osc>0 then color.green else color.red); zero.SetDefaultColor(color.cyan);by rigel - Trading Discussion
Quotestyx 1 I would like to able to smooth the two input periods with a mov. avg. So as the code is wrote. I want to be able to smooth the SPX 63 period and the stocks 63 period with a mov. avg. Just wanting to make the indicator line smoother and not as jagged as they look now? If you replace your Plot Rs with this line, it will smooth the RS with a 15 period simple average : plot RS =by rigel - Trading Discussion
captain597 Try this # % Price change vs Day's Opening # by Rigel 2018 def agg=aggregationPeriod.DAY; def price = close; def opening= Open(period=agg); def PercentChg = 100 * (price / opening-1); AddLabel(yes, Concat("%change = ", Round(percentchg, 2)), if percentchg <0 then Color.RED else if percentchg >0 then color.GREEN else color.white);by rigel - Trading Discussion
Nassavah I assume you want an script alert based on a study that you have created and not a fixed value you have to setup again and again... if that is right, it is actually possible, you need to work in the market watch - alerts - study alerts section Google study alerts Cheersby rigel - Trading Discussion
Paras Did you find the solution ? if not you can PM me. Rigelby rigel - Trading Discussion
Dilan Your code is according to syntax AddOrder(OrderType.SELL_TO_CLOSE, targetHit, open[-1], 1, tickColor = GetColor(6), arrowColor = GetColor(6), name="Profit Target Exit" ) So it seems that "sell to close" ignores the contract size and simply closes any open position. As you are not posting the whole code that is my best guess. For your second question it wouldby rigel - Trading Discussion
netarchitect, here you have it # Bill Williams Fractal Template # Coded By: Rigel May 2018 #Define "n" as the number of periods and keep a minimum value of 2 for error handling. input n=2; # Williams Fractals are a 5 point lagging indicator that will draw 2 candles behind. # The purpose of the indicator is to plot points of trend reversals. # Often these are paired withby rigel - Trading Discussion
QuoteParas Where can I get that kind of script and how much that script will cost? Please contact Robert in his site . Every coder has different rates some do it for 50 USD per hour while others charge depending of the job. If that doesn't work, let me know and I could give a try if I find some time.by rigel - Trading Discussion