Ichimoko Kinko Hyo

 

Hello everyone,

I have been doing some research on  Ichimoko Kinko Hyo trending system. https://www.forexfactory.com/attachment.php/1141519?attachmentid=1141519&d... 

Now I am trying to code it so that it will advise me of which way the trend is going. I started this code below

My variables "bearish" & "bullish"  are only receiving values of (0.0) and (1.0)

Why doesn't it give me the entire value of ts or, ks?

edit: I used  "PriceOrderClose" variable to test with, because its not used and is already a variable I have.


Edit: Code removed.

 
GrumpyDuckMan: My variables "bearish" & "bullish"  are only receiving values of (0.0) and (1.0) Why doesn't it give me the entire value of ts or, ks?
bearish   = ts <= ks; // bearish signal.
bullish   = ts >= ks; // bullish signal.
  1. False is zero and true is non zero. Why do you expect your comparison (ts<=ks) to be anything else?

  2. ts  = DoubleToString (TenkanSen,5);  
    ks  = DoubleToString (KijunSen,5);
    Why are you converting your values to strings and then comparing them? 100 is greater than 99 but "100" is less than "99" because "1" comes before "9."
 
whroeder1:
  1. False is zero and true is non zero. Why do you expect your comparison (ts<=ks) to be anything else?

  2. Why are you converting your values to strings and then comparing them? 100 is greater than 99 but "100" is less than "99" because "1" comes before "9."

Hello again,

1:  Yeah, I realised that after I had edited my post.

2:  Sorry, bad habit I got into while debugging code.