<button id="modabtnautoclick" style="display: none;" data-toggle="modal" data-target="#sendCommand" class="btn btn-sm btn-warning"><i class="fa fa-wrench"></i></button>

          </footer>

          <script src="dashboard_assets/js/cryptorio.bundle.js"></script>





          <script src="node_modules/sweetalert/dist/sweetalert.min.js"></script>







            <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

        <script src="dist/js/bootstrap.min.js"></script>

        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!-- 
        <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
 -->
          

       <!--  <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script> -->









        <script src="node_modules/push.js/bin/push.js"></script>

        

          <?php 

        if ($getLayoutValue == '0') {
          # code...
          ?>
          <script type="text/javascript">
           $(document).ready(function() {
                darkTheme();
              });
          </script>
          <?php 

        }else{

          ?>
          <script type="text/javascript">
               
                $(document).ready(function() {
                lightTheme();
              });
          </script>
          <?php 

        }

        ?>

        <script type="text/javascript">
            $('#calculate').on('click', function(e)
        {

          var interest1 = $('#interest1').val();
          var interest2 = $('#interest2').val();
          var interest3 = $('#interest3').val();
          var interest4 = $('#interest4').val();
          var interest5 = $('#interest5').val();
          var refreshRate = 0;
          if(interest3 == "D")
          {
             refreshRate = 1000 * 60 * 60 * 24;  
          }
          else if(interest3 == "H4")
          {
             refreshRate = 1000 * 60 * 60 * 4;   
          }
          else if(interest3 == "H1")
          {
             refreshRate = 1000 * 60 * 60; 
          }
          else if(interest3 == "M30")
          {
             refreshRate = 1000 * 60 * 30; 
          }
          else if(interest3 == "H15")
          {
             refreshRate = 1000 * 60 * 15; 
          }
          else if(interest3 == "H5")
          {
             refreshRate = 1000 * 60 * 5;  
          }
          var temp = $(this).val();
          if(temp == "Stop"){
             $('#started').val("0");
             $(this).val("Calculate");
             $(this).html("Calculate");
             return false;
          }
    //       Allowing this to push the nodes through
          $.post('/controller/calculate.controller.php', { interest1 : interest1, interest2 : interest2, interest3 : interest3, interest4 : interest4, interest5 : interest5,  action : "calculate" })
             .done(function(data)
             {
                console.log(data);
                var info = jQuery.parseJSON(data);
                console.log(info);
                if(info.suggestion == "Short" || info.suggestion == "Strong Short"){
                   $('#status').css('color', 'red');
                }
                else{
                   $('#status').css('color', '#5cb85c');
                }
                var msg = "-------Invata.io------- \n" + "Suggestion: " + info.suggestion + "\nEntry Point: " + info.EntryPoint + "\nProfit Point: " + info.profitPoint + " \nStrength of Decision: " + info.strength + "%";
                $('#status').html(msg);

             });
          $('#started').val("1");
          $(this).val("Stop");
          $(this).html("Stop");
    //       Allowing this to push the nodes through
        });






             $('#closeTrades').on('click', function(e){
        $.post('/controller/calculate.controller.php', { action : "delete" })
        .done(function(data){
        console.log(data);
        });
        });









    //  Function to let neural network know the output was incorrect
        $('#incorrect').on('click', function(e)
        {
    //       This will grab our data needed and inport it.
             var output = $('#output').val();
             var nodeId = $('#nodeId').val();
    //          Send the validation that the output node was incorrect
             $.post('/controller/calculate.controller.php', { action : "incorrect" })
             .done(function(data)
             {
                $('#status').html("Data marked Incorrect.");
             });
        });



          $('#executeCommand').on('click', function(){
             var symbol = $('#symbolCommand').val();
             var decision = $('#orderCommand').val();
             $("#executeCommand").html('Please Wait');
             console.log(symbol);
             console.log(decision);
             $.post('controller/order.controller.php', {symbol : symbol, decision : decision})
             .done(function(data){

              if (data == 'done') {

                var audioElement = document.createElement('audio');
                audioElement.setAttribute('src', 'sounds/ding.mp3');
                audioElement.play();

                $("#executeCommand").html('Send Command');

              }

             });
          });




        
    //  Function to let neural network know the output was correct
        $('#correct').on('click', function(e)
       {
          $.post('/controller/calculate.controller.php', { action : "correct"})
          .done(function(data){
             $('#status').html("Data marked Correct.");
          });
        });









        $('#addTrackerForm').on('submit', function(e){
          


          e.preventDefault();
          $.post('../controller/tracker.controller.php', $("#addTrackerForm").serialize())
            .done(function(data){
                location.reload();
            });

        });


        </script>





        <script type="text/javascript">
          function removeTracker(id)
          {
               swal({
                title: "Remove Alert",
                text:"Are you sure you want to remove alert?",
                icon: "warning",
                dangerMode: true,
              })
              .then((willDelete) => {
                if (willDelete) {


                  $.post('/controller/tracker.controller.php', { action : "removeAlert", id:id})
                    
                    .done(function(data){
                      

                      var result = JSON.parse(data);

                      var res = result.result;

                      if (res == 'success') {



                                  $("#"+id).remove();
                                  swal("You have successfully removed alert", {
                                    icon: "success",
                                    dangerMode:true,
                                  });



                      }else{


                          alert('Something went wrong');

                      }


                  });

                }
              });
          }
        </script>




        <script type="text/javascript">
          function modifyTracker(email, sym, price, len, id)
          {
               
                $("#tsymbol").val(sym).change();
                $("#temail").val(email);
                $("#tprice").val(price);
                $("#tlength").val(len);
                $("#tid").val(id);


          }







        </script>


          <script type="text/javascript">
        


        $('#modifyTrackerId').on('submit', function(e){
          


          e.preventDefault();
          $.post('../controller/tracker.controller.php', $("#modifyTrackerId").serialize())
            .done(function(data){
                var result = JSON.parse(data);
                var res = result.result;
                if (res == 'success') {

                  location.reload();
                }else{

                  alert('Something went wrong');
                }
            });

        });
        </script>








       </body>

       <!-- Mirrored from crypterio-demo.smashingdevs.com/Dark/exchange.php by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 12 Feb 2019 17:01:05 GMT -->

    </html>




    