Dear All,
would you please help me in solving following problem:
I installed the following indicator and displayed below main chart window…all is ok.
// ------------------------------------------
pr= 2
pr2= 10
EWpk2= HIGHEST[1](High) > (High)*(1-pr2)/100
EWtr2= LOWEST[1](Low) < (Low)*(1-pr2)/100
// Intermediate Elliot Wave stuff
//zz= ZigZag[pr](close)
zzHi2=ZigZag[pr2](High)
zzLo2=ZigZag[pr2](Low)
avg2=(zzHi2+zzLo2)/2
If EWpk2 Then
RetroSuccessSecret2= zzHi2
ELSIF EWtr2 Then
RetroSuccessSecret2= zzLo2
ELSIF (avg2>avg2[1]) THEN
RetroSuccessSecret2= high
ELSE
RetroSuccessSecret2= Low
ENDIF
EW2=ZigZag[pr2](RetroSuccessSecret2)
LRZZEW2= LinearRegressionSlope[pr](EW2)
RETURN LRZZEW2 coloured(0,0,200) AS "LRZZ EW[10]"
Then I added “vertical lines” to signal “Sell”(red) and “Buy”(green) like this:
indicator = CALL "LRZZ EW[10]"
IF indicator [1]<0 and indicator crosses over 0 then
DRAWVLINE (barindex-0.1)coloured(0,132,42,100)
ELSIF indicator [1]>0 and indicator crosses under 0 then
DRAWVLINE(barindex-0.1) coloured(255,0,0,100)
ENDIF
RETURN indicator
Unfortunately, the “loading time” of chart increased heavily…. 🙁
In order to display “vertical lines” (red and green) in main chart window, I added this indicator code directly in settings of main chart window.
Now, complete indicator and “vertical lines” are displayed in main chart window, but “loading time” of chart + indicator is very, very slow…
Please help me, how can I display only the vertical lines from indcator window in chart window and improve again loading time…???
Thank you very, very much in advance.
Regards Micha
Depends on how much far in the past you’d like your indicator to draw lines, but you could use:
DEFPARAM CalculateOnLastBars = 200
It will only calculate the indicator on the last 200 bars instead of the whole price history = calculateonlastbars
Bonjour Nicola,
thank you very much for your help; I will try now.
P.S. is it correct, that I installed 2x times the indicator? Once indicator windows BELOW main chart window & second directly in main chart window?
Is there any solution, only to “copy” the vertical lines from “below indicator window” to main chart window…?
Merci beaucoup
Micha
You don’t need to run the 2 indicators at the same time. Since you are calling the calculation of your Eliott wave of your first indicator in the second one, just add only this one applied on price only (use the wrench on the upper left side of the chart).
I will do so..thank you again Nicolas.
Best Regrads
Micha