KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Capestone Fundaments 3.3

  • Capestone Fundaments 3.3

    Posted by subhashchander on August 4, 2023 at 12:00 am

    Hi , even though the badTrades was created as per the requirement still can’t pass the exercise which throws the below error . can that be explained. Or can the requirement be elaborated further.

     

     

    badTrades:select from (update exQuality:classifyTrades[tradeContext`side;tradeContext`price;tradeContext`ask;tradeContext`bid] from tradeContext) where exQuality=0b //your code here - or work in the scratchpad 

     

     

     

    subhashchander replied 9 months, 3 weeks ago 2 Members · 2 Replies
  • 2 Replies
  • subhashchander

    Member
    August 4, 2023 at 12:00 am

    Hi  , I have altered the code to a single input function and getting the desired output as provided above but still i am not able to pass the exercise.

    classifyTrades:{[x] side:x`side;price:x`price;ask:x`ask;bid:x`bid; ?[side=`B;?[price<=ask;1b;0b];?[price>=bid;1b;0b]]}
    update exQuality:classifyTrades[tradeContext] from tradeContext

    badTrades:select from (update exQuality:classifyTrades[tradeContext] from tradeContext) where exQuality=0b

     

     

    even though i could get the desired output I cannot pass through

  • Laura

    Administrator
    August 14, 2023 at 12:00 am

    You can move the update inside classifyTrades

Log in to reply.