Help in Connecting an Automated Fib to a Zig Zag indicator

 
Hi,
Can someone please help me figure this out. I am new to programming (three days of C++ training behind me) and I lack the skills and knowledge to figure this out. I have been looking at this code for four days and found where the Fibo is and to make changes to the Zig Zag indicator, but I have no idea how to do the following;

For an up trend: I want to attach the Fibonacci to the current low and the previous high. For a down trend: I need the Fibonacci to connect to the current high and the previous low.

eg: This is my current Fibonacci setup - File: Fibo current


This is how I want it to look - File: Fibo desired


I have attached the code for the indicator.

I think I need to add something to the OBJ_FIBO, but not sure what.
Any advise will be greatly appreciated.
Thanks
 
The Fib is attaching to LastZigZag and PreviousZigZag, you want it to attach to PreviousZigZap and OneBeforePreviousZigZag . . . you will need to create OneBeforePreviousZigZag and give it the correct values in the code.
 

Thank you RaptorUK for the advise, but I have no idea what to do.

I will have to put this project on the back burner until I know more about programming and how to correct and add values.

 
RaptorUK:
The Fib is attaching to LastZigZag and PreviousZigZag, you want it to attach to PreviousZigZap and OneBeforePreviousZigZag . . . you will need to create OneBeforePreviousZigZag and give it the correct values in the code.

Hi RaptorUK,

I think I have it figured out. You mind looking over the code and see if it's OK or did I miss something. It looks like it's working, but I would like a 2nd opinion.

If you don't have time, no worries as I am sure time will tell if it's working as intended.

Thanks,

dnlrsms