• Australian (ASX) Stock Market Forum

Hello and welcome to Aussie Stock Forums!

To gain full access you must register. Registration is free and takes only a few seconds to complete.

Already a member? Log in here.

Add MultiText Column

Discussion in 'Software and Data' started by Steve C144, Aug 9, 2019.

sentifi.com

Aussie Stock Forum Sentifi Top themes and market attention on:

  1. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    Hi all,
    In the below I am trying to get "up" or "dn" ...see the column has dn, but I can't get the up to work...any ideas? Up = above 1 and down = below one in the column to the left of the missing up signals. TIA.
    Filter = 1; // all bars

    x = ROC (C, 30);
    y = ROC (C, 70);
    z = ROC (C, 100);

    today = x + y + z;
    today1 = Remap(today, -100, 100, 0, 2);

    TextList = "up\ndn";
    TextSelector = 1 * (today1<1) + 2 * (today1>1);
    AddMultiTextColumn(TextSelector, TextList, "direction" );

    upload_2019-8-9_15-3-44.png
     
  2. Trav.

    Trav.

    Posts:
    402
    Likes Received:
    393
    Joined:
    Nov 27, 2017
    I think you will find textselector starts at 0 then1, 2 etc
     
  3. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    Solved it! missin \n in text list...should be \nup\ndn
     
  4. Trav.

    Trav.

    Posts:
    402
    Likes Received:
    393
    Joined:
    Nov 27, 2017
    I think you found a work around, but I believe that it should be

    TextSelector = (today1<1) + 1 * (today1>1);
     
  5. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    Cool, will try it out...thanks heaps.
     
  6. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    Had to add as below...but it works now...thanks again.
    TextSelector = 1 * (today1<1) + 2 * (today1>1);
     
  7. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    ps.... still need "\nup \ndn" for it to work...FYI...
     
  8. Trav.

    Trav.

    Posts:
    402
    Likes Received:
    393
    Joined:
    Nov 27, 2017
    did you remove the extra \n you inserted?
     
  9. Trav.

    Trav.

    Posts:
    402
    Likes Received:
    393
    Joined:
    Nov 27, 2017
    overlapping posts.

    Good that you got it working
     
  10. Steve C144

    Steve C144

    Posts:
    19
    Likes Received:
    0
    Joined:
    Jun 17, 2019
    Cheers
     
Loading...

Share This Page