Ah I can see the scan results after setting "within 500" bars instead of 1. I guess since it's after hours now, setting to 500 looked back at bars 2500 mins ago.
Let me try the scan tomorrow morning during trading hours!
@BenTen the backtest results for this strategy have been great for me. I wanted to setup a conditional "buy" order based on these indicators so that TOS automatically buys and sell when the alerts fires.
I was able to click on the gear icon on a draft order and setup conditions but I could not figure out how to sell/exit automatically? Do you have any insights there?
I actually want to setup an OCO bracket order which buys when bull indicator is true. The "take profit" order should be EntryPrice() + 3%. Stop loss should either be when bear indicator is true or EntryPrice() - 6%.
Do you know if such an OCO order can be placed automatically on the study?
I still cannot get the alerts to go off. The indicator is out there. I have a couple watchlists. Any idea why i would not alert on the arrows from a particular watchlist? This such a useful tool but you have to be on a stock to see the arrow. I would love if someone could show me how to set up the alert on a watchlist to sound off when a bull/bear arrow is placed on the chart. Anyone?
@UsDollarClub How do you suggest calculating "bounces off VWAP"...??? Kinda tough to code getting close and then reversing... Sounds like you want a lot of custom coding... Have you tried to do any of that yourself...??? We're willing to help those willing to help themselves but as a rule don't just write entire studies upon request... We all have our own coding to do...
Hi, I am new here and trying to learn. I am trying to make a script to add a label on a chart only when a candle body is straddling the daily VWAP.
Here is what I have so far. I think it is using the VWAP of the current candle. I need it to use the daily VWAP but cant figure it out. If anyone can help me out I would greatly appreciate it.
# current candle straddling Daily VWAP
def cross = (high > vwap and low < vwap);
(yes, ".........................VWAP ALERT.............................."
+ if cross then "" else "0",
if cross then CreateColor(135, 135, 255) else CreateColor(32, 32, 32));
What I want is to have a label pop up at the top of the chart when a candle is straddling / engulfing the VWAP value. The code I came up with in my opening post does put the label up on top of the chart but that's all it does so far. I can play with the "def cross = (high > vwap and low < vwap);" and get the label to show or not but that's all I have so far. It is displayed all the time it does not toggle on and off when a candle is straddling or not.
Simply when a candle builds and it's high goes above the VWAP line and it's low goes below the VWAP line the code should put the label on the chart. If the next candle builds and is completely above or below the VWAP the label will not be put on the chart.
OK the line in the middle of the chart is the VWAP. If the candle high is above it and the low is below it it should put that purple VWAP Alert label on the chart. Currently the label is there most of the time. Once in a while it will go away then come rite back.
First of all, love the indicator and have been using it for a while now. Thanks very much for it. I have a question on it as to why it triggers sometimes but not others? See example below. It's pretty common for it to not trigger when conditions have been met and I'm just wondering if you know why and if that could potentially be fixed. The only adjustment I've made to your code in my application is changing the arrow from cyan to orange and adding the alerts.
@BenTen I could throw examples at you all day, it's a pretty common occurrence. I can post some more if you like but if you just take a random chart you should it notice it too. I even see a few examples/close ones on your example charts where you posted the code.
In general, choosing the right ticker and building a strategy around the indicator works well. And I've known it doesn't trigger all the time and I thought that was built in somehow. But after using it for a few months and getting better at understanding thinkscript, I went into the code and think it's really just VWAP:VolumeAvg cross signals with no "extra" descriptors to rule out crosses with acceptable volume trigger. So I just wanted to ask you if you knew what was going on with it.