by summerset » Mon May 24, 2010 8:46 am
Hi,
I would like to code 2 custom signals based on the WSI indicator.
The coding should run as follows, but of course converted to "lua"
A- To code the oscillator:-
a= (CCI[100](typicalPrice) * ADX[100]) / 1000
return a as "Wsi"
The indicator must plot in histogram form, with green bars > zero line, and red bars < zero line.
The overbought & oversold lines for the WSI are +1.5 & -1.5 respectively.
B- To code the Signal Expert taking entries in Trending Conditions based on the Elliot 142 Rule. :-
///REM
This signal expert will be called WSI-142
Condition1 = WSI[100] > 1.1
Condition2 = WSI[100] < -1.1
Condition3 = WSI[14] (1) < -1.5 THEN WSI[14] (0) > -1.5
Condition4 = WSI[14] (1) > 1.5 THEN WSI[14] (0) < 1.5
IF Condition1 THEN Condition3 THEN
AddBuyEntry
ENDIF
IF Condition2 THEN Condition4 THEN
AddSellEntry
ENDIF
IF WSI[14] < -2 THEN AddBuyExit
ENDIF
IF WSI[14] > 2 THEN AddSellExit
ENDIF
C- To code the Signal Expert taking entries On Trend Breakout Conditions based on Swing Pivot Analysis, &trader sighting of a 5-3 formation.
///REM
This signal expert will be called WSI-Sp, and is only attached by the trader on a specific 30min chart after, visual sighting done by the trader to spot the cycle WSI falling < or rising above the breakout WSI of an H&S or double top / double bottom formation on the 4hr chart. The trader will have also undertaken a manual Elliot count on the 30min chart to assert the breakout a preceding 5-3 cycle between 2 cyclic bottoms in the direction of the coming entry.
TIMEFRAME(4HR)
Condition1 = WSI[100] = imput parameter by trader
Condition2 = WSI[100] > Condition1 AND WSI[14] > 1.5
Condition3 = WSI[100] < Condition1 AND WSI[14] < -1.5
TIMEFRAME(30 minutes)
Condition4 = WSI[14] (1) < -1.5 THEN WSI[14] (0) > -1.5
Condition5 = WSI[14] (1) > 1.5 THEN WSI[14] (0) < 1.5
TIMEFRAME(1HR)
Condition6 = WSI[100] (1) < -1.75 THEN WSI[100] (0) < -2
Condition7 = WSI[100] (1) > 1.75 THEN WSI[100] (0) > 2
IF Condition2 THEN Condition4 THEN AddBuyEntry
ENDIF
IF Condition3 THEN Condition5 THEN AddSellEntry
ENDIF
IF Condition6 THEN AddBuyExit ENDIF
IF Condition7 THEN AddSellExit ENDIF
===================================================================== END.
If the programmer requires more indepth understanding of what's behind the function of the signals', I can mail him detailed explanation slides which include trade examples.
THANKS & All the Best.
Sincere Regards
Summerset