guidence for next project (insert knowledge here please)

 

alright fellas....

i would like to code a ZigZag indicator that is based off of the swings of an oscillator.

for example i would like to find the highest price reached during a bullish momentum swing (momentum indicator moving from negative to positive) and then the lowest prices reached during a bearish move.

i have limited coding capabilities but i am actively trying to learn.


what i don't understand is how to establish the highs and the lows of a swing based off of another indicator...

any help would be greatly appreciated.

thanks in advance

LanBar

 
LanBar:


for example i would like to find the highest price reached during a bullish momentum swing (momentum indicator moving from negative to positive) and then the lowest prices reached during a bearish move.


in this sentence you have all you need:

1) identify swingpoints of the ossi

2) identify high/low during that swing

3) connect these points

1)

if(pos+1 > pos && pos-1 <pos) UpSwingStartPoint=pos, DownSwingEndPoint=pos

if(pos+1 < pos && pos-1 >pos) UpSwingEndPoint=pos, DownSwingStartPoint=pos

2)

new zigzagpoint=

a) when new upswing start Lowest(from DownSwingStartpoint to DownSwingEndPoint)

b) when new downswing start Highest(from UpSwingStartpoint to UpSwingEndPoint)

3)

connect zigzagpoints

 

Thanks !

let me give that a shot and i will post the code i come up with.

 
LanBar:

alright fellas....

i would like to code a ZigZag indicator that is based off of the swings of an oscillator.


Dont want to rain on your strawberries but I'm not sure what strategy this is for

The handy things about oscillators is that successive extremes can diverge from price action as their key signal,
or when they breakback through key levels

By the time you have joined the dots with a zig-zag, it will be somewhat... late..?

Excellent that you are having a go though :)

-BB-

 

Yes i agree BB!

unless you use an extremely short period, oscillators don't produce fast enough signals to catch the bulk of a move, and then on top of that you then have to deal with all of the false signals given by the short time frame. but my strategy uses the extremes of previous moves compared to current price actions to take positions and manage exits. but like you mentioned, the most useful information shown by occis is price divergence. this project is just the first step towards making a divergence indicator which from here seems like quite a task.

Thanks

Landon

 

ok back to this....

i am still really confused on how to establish the the points needed to find the high or the low of a swing from occi or histogram....

could someone please post an example.

for example lets use the Momentum indicator. could someone post a zigzag based off of the swing of a momentum indicator please?

 
bump
Reason: