Tampman Wrote: ------------------------------------------------------- > Baffled - thanks... and no I did realize you could > combine studies with clicking an arrow... I > usually open each separately and then drag one of > the studies and put it together in the same box > with the other one... Hahaha, funny Tampman- took me 7+ years to figure that dragging out. And you guysby baffled1 - Trading Discussion
Tampman, yes can use both studies simultaneously. Could also combine into a single code but why bother? Howo3579, I use the Daily (set it and forget it, win lose or draw). If I need to make more after that or if I didn't get a Daily signal etc, I use the 2-Hour. The Hourly has very low gains. I trade 70% of available margin on each trade; on EURUSD that means I need about 23 pips for a 10% gain iby baffled1 - Trading Discussion
okay, TAMPMAN, here's the shorting script. I use the "open-low" for range for reasons stated earlier, but in the inverse: def rundown1 = close < close[1]; def rundown2 = close < close[2]; plot Below = rundown1 and rundown2; Below.SetDefaultColor(Color.RED); Below.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); # --- define range --- def Range = open - low; #by baffled1 - Trading Discussion
Tampman Wrote: ------------------------------------------------------- > Baffled - Thanks... Yes, would appreciate the > full code for a short when you get the > chance..otherwise I'll muck it up... If I > understand correctly, for the code above for a > Long signal ..I just need to get rid of the *1000 > and change to "def range" to close-open? > >by baffled1 - Trading Discussion
Tampman, the "#" symbol just isolates a phrase or sentence from the operating code. After writing such a phrase, create a paragraph break by hitting Enter. So no, it's just an explanatory note. The codes above are not what you use to create the Average. That code looks like this- and if you're trading stocks you'll have to get rid of the 10000 multiplier because this is for EURUSD: dby baffled1 - Trading Discussion
I finally got time to get back to trading and loaded the Robert Discrete Averaging code for testing. I trade forex and what I found out was that the text box on the face of the chart only reads to 2 decimals. So the code works fine as is on stocks but reads out as 0 on forex. My workaround for forex was to insert a multiplier to give me pips. Original Line of code is: def AvgRange = TheSum / Avby baffled1 - Trading Discussion
Tampman Wrote: ------------------------------------------------------- > @Baffled - A little confused... can you explain > what this code is supposed to do....Looks like go > long at blue arrow? What time frame would this > be used on? Thanks... Tampman, howo3579 explained it well- even beyond what I intended. My original intent was "go long at open of next candle afterby baffled1 - Trading Discussion
Robert, thanks again for your help. Due to some personal financial confusion, I only just now got to your Tip Jar.by baffled1 - Trading Discussion
howo3579 Wrote: ------------------------------------------------------- > I was thinking all night and try to come up with > some thing but it just made my head hurt. I was > trying to use compoundvalue() and fold to do it > but I have no idea how to get the barnumber of the > previous 50th "eventful next" candle. I suppose > Rob or some math genius can help usby baffled1 - Trading Discussion
robert Wrote: ------------------------------------------------------- > > my question is: > How do I get an average for a conditional event? > Base code works fine and is: > Alright. We'll work through this one together. > > Baffled, I am assuming that you want to know the > average range of the first candle following a > run-up signal... > >... Hoby baffled1 - Trading Discussion
Robert, I'm amazed you do all this just to help people. Thank you. Anyway, I'm stumped. Believe it or not, I actually teach basic Thinkscript to folks, enough so they can add and subtract anyway but nothing advanced (because I'm not advanced). So my question is: How do I get an average for a conditional event? Base code works fine and is: def runup1 = close>close[1]; def runup2 = close>by baffled1 - Trading Discussion