Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
blib
Members-
Content Count
14 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by blib
-
Does anyone know the syntax to be used in EL to compare the most recent pivot hi (or low) with the one preceding it -- i.e. to determine if a lower high is made in an upswing or higher low in a downswing?
-
I don't see any code under zigzag posted you you - if you have it, do you mind reposting it or post the URL - thanks
-
Sevensa, The idea behind using [-1] is to prevent the indicator from giving a false true signal if the full momentum high or low has not yet been put in. In other words, I need to check the subsequent bar to see if it's higher/lower and give signal ONLY if it isn't. Any idea on how to accomplish that?
-
Below is the code for a simple indicator that tests for momentum high/low based on a moving average oscillator reading. The idea is to return a value/plot/alert if the criteria is true (i.e. the oscillator is at its highest/lowest point in 30 bars). The caveat is to disqualify points that are the highest while the momentum is still rising and vice versa, hence the test to see if it's higher/lower than the subsequent data point. I thought that I took care of the issue by first nesting the whole check withing "lastbaronchart=false" condition, however I still get "Tried to reference future data" error. Please help inputs: shortMA(3), longMA(10); vars: FastOsc(0), MomHigh(false), MomLow(false); if lastbaronchart=false then begin FastOsc=averagefc(c,shortMA)-averagefc(c,longMA); if FastOsc=highest(fastosc,30) and fastosc>fastosc[-1] then begin plot1(fastosc,"mom high"); MomHigh=true; alert("Momentum High"); end; if FastOsc=lowest(fastosc,30) and fastosc<fastosc[-1] then begin plot2(fastosc,"mom low"); MomLow=true; alert("Momentum High"); end; end;
-
Blu-ray, Do you know how to set this up in scanner so that it can be applied on a broader list of sybmols that aren't otherwise in my radar screen?
-
I'm trying to run the following indicator in a RadarScreen window. Basically, I want to set an alert (and possibly run it in a scanner) to test when new momentum high/low is made as measured by the below oscillator. I'm running into a problem where TS "locks up" and send off alerts continuously even though I have "Once per bar interval" checked. Does the code need to be altered? inputs: shortMA(3), longMA(10); vars: FastOsc(0); FastOsc=averagefc(c,shortMA)-averagefc(c,longMA); if FastOsc=highest(c,30) then plot1(FastOsc,"Momo high"); alert("Momentum High"); if FastOsc=lowest(c,30) then plot2(FastOsc,"Momo low"); alert("Momentum High");
-
Maybe that may be a good place to start (radar screen) - I'm concerned about having too many rows, but I suppose I can see how it goes. How would you set up a scan to check new momentum high/lows on different time frames? Shoot me a private, perhaps I can explain in more detail that way
-
this is a list of equities and futures that I trade regularly. If you are familiar with EL and could help me code it, I would be very grateful.
-
apologies this is the correct code, but oddly enough the exp moving average remains static, any ideas why? Inputs: MALen(20); Vars: XMA(0), Price©, AvgRange(0), UpperKC(0), LowerKC(0), trigger(0), impulse(0); XMA = XAverage(Price,MALen); AvgRange=MAverage(TrueRange,MALen); UpperKC=XMA+(AvgRange*2.5); LowerKC=XMA-(AvgRange*2.5); if (High > UpperKC) or (Low < LowerKC) then Impulse=Impulse + 1; if Impulse=1 then begin if (High > UpperKC) then Plot1 (High+AvgTrueRange(14), "KC", yellow); if (Low<LowerKC) then Plot1 (Low-AvgTrueRange(14), "KC", yellow); alert("Keltner Violation"); trigger=0; end ; if Low crosses below XMA or High crosses above XMA then trigger = trigger + 1; if trigger=1 and impulse>0 then begin Plot2(XMA, "xma", yellow); alert("Price at EMA"); impulse=0; end ; plot3(UpperKC,"UpperKC",blue); plot4(LowerKC,"LowerKC",blue); plot5((XMA+AvgRange),"+1ATR",yellow); plot6((XMA-AvgRange),"-1ATR",yellow); plot7(xma,"xma");
-
Paul, Given that I would like to apply the screen to a broad universe of products, I'm guessing the scanner if best. I have the basic indicators in place that I currently use in charts and would like to code it such that I would have a list of products that meet the various criteria. If you could assist with the coding, I'd be greatly appreciative.
-
I'm looking for help in setting up a scripts that I can run in a scan window first thing in the morning that will scan a list of futures products that I follow for specific criteria. 1. New momentum high/low (3/10 Oscillator making a new overnite high/low relative to previous x bars) 2. Momentum divergences - 3/10 oscillator and price move in opposite directions from prior price pivot point any suggestions or assistance is greatly appreciated
-
I am using the following show me code to run within RadarScreen to be applied to a number of instruments and generate dual alerts, once for a condition setup, the other for the condition trigger. I have set up counters to prevent extraneous setup alerts prior to the trigger and vice versa. I've had problems running this in the past parallel to a chart alert such that alerts generated through RadarScreen sometimes yielded data that was inconsistent with what was visible on a chart. I have checked off "Load additional data for cumulative calculations" box with bars set to 100 in both the chart and RadarScreen. Please take a look to see if there is anything else (possibly intrabarpersist) that may need to be added in order for this to work properly. Thank you. Inputs: EMA_Length(20), ATR_Length(14); Vars: XMA(0), AvgRange(0), UpperKC(0), LowerKC(0), trigger(0), impulse(0); XMA = XAverage(Close,EMA_Length); AvgRange=AvgTrueRange(ATR_Length); UpperKC=XMA+(AvgRange*2.5); LowerKC=XMA-(AvgRange*2.5); if (High > UpperKC) or (Low < LowerKC) then Impulse=Impulse + 1; if Impulse=1 then begin if (High > UpperKC) then Plot1 (High+AvgTrueRange(14), "KC", yellow); if (Low alert("Keltner Violation"); trigger=0; end ; if Low crosses below XMA or High crosses above XMA then trigger = trigger + 1; if trigger=1 then begin Plot2(XMA, "xma", yellow); alert("Price at EMA"); impulse=0; end ; plot3((XMA+AvgRange),"+1ATR",yellow); plot4((XMA-AvgRange),"-1ATR",yellow);
-
Nvesta, I too trade mostly ES and find that there is a fine balance between having the necessary tools and cluttering your screen with things that don't add value. In addition to internals $TICK, up/dn volume, adv/dec, I also like to look at sectors (xlf, xle, xlp, xly, xli, xlv, xlu, xlk, & xlb) as these tend to give a broad idea where the leadership in the market is coming from. Similarly, looking at the VIX & bonds may also be helpful more as confirmation of moves than leading indicators. Lastly, oil is somewhat useful but only at extremes imo. The caveat to all this is that relationships are dynamic, sectors and "market tells" move in and out of favor and need to be re-evaluated on an ongoing basis for them to have value.