Huffmac90
Member
Gents,
I have a complicated request for code but if it works it gives you nearly perfect entries and exits. Basis is utilizing a RSI (8, 70, 30 (green zone)) with a 20 & 80 (yellow zone) and 10 & 90 (red zone), then a Williams%r set to (8, -20,-70), and an On Balance Volume (OBV). the key is confluence and when all three touch you have a perfect entry on all time frames and when all three touch on the top quadrant you have a perfect exit. This is very similar to what you are trying to achieve but more accurate.
Ultimately, I want to boil this down to a simple arrow on the chart. I've been messing with the code and can get it to show arrows but it shows arrows on all candles which doesn't help at all. Any tips, trick, or code would be awesome. (I'm really new to code [1month] [the newb], pretty experienced with trading) back testing I'm 83% accurate! (UGAZ fundamentals are killing me otherwise it would be 89%). My ultimate goal is to help veterans make a little extra scratch on the side and teach them how to trade. (Disabled Vet - Have to help my peeps)
The Triple Threat:
I have a complicated request for code but if it works it gives you nearly perfect entries and exits. Basis is utilizing a RSI (8, 70, 30 (green zone)) with a 20 & 80 (yellow zone) and 10 & 90 (red zone), then a Williams%r set to (8, -20,-70), and an On Balance Volume (OBV). the key is confluence and when all three touch you have a perfect entry on all time frames and when all three touch on the top quadrant you have a perfect exit. This is very similar to what you are trying to achieve but more accurate.
Ultimately, I want to boil this down to a simple arrow on the chart. I've been messing with the code and can get it to show arrows but it shows arrows on all candles which doesn't help at all. Any tips, trick, or code would be awesome. (I'm really new to code [1month] [the newb], pretty experienced with trading) back testing I'm 83% accurate! (UGAZ fundamentals are killing me otherwise it would be 89%). My ultimate goal is to help veterans make a little extra scratch on the side and teach them how to trade. (Disabled Vet - Have to help my peeps)
The Triple Threat:
Code:
input length = 14;
input over_Bought = 70;
input over_Sold = 30;
input price = close;
input averageType = AverageType.WILDERS;
input showBreakoutSignals = no;
def OBV = TotalSum(Sign(close - close[1]) * volume);
def hh = Highest(high);
def ll = Lowest(low);
def WR = if hh == ll then -100 else (hh - close) / (hh - ll) * (-100);
def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RSI = 50 * (ChgRatio + 1);
def runup = if ((RSI and WR >= Over_sold) and OBV >=-80) then 1 else 0 ;
def rundown = if ((RSI and WR >= Over_bought) and OBV >=-20) then 1 else 0 ;
plot Above = runup;
Above.SetDefaultColor(Color.GREEN);
Above.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot Below = rundown;
Below.SetDefaultColor(Color.RED);
Below.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Last edited: