Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Error message when trying to compile - not exactly sure how to fix it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error message when trying to compile - not exactly sure how to fix it

    Hi,

    I am getting the following error message Operator '-' cannot be applied to operands of type 'string' and 'double' when trying to compile the code below;

    Code:
    Print("S = " + bidPrice - lastPrice  + " Levels");
    Appreciate your help,
    suprsnipes
    Last edited by suprsnipes; 07-23-2012, 08:57 AM. Reason: Wrong line of code used initially

    #2
    suprsnipes,

    I would suggest doing this :

    double temporary = bidPrice - lastPrice;

    Print("S = " + temporary + " Levels");

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your help

      Comment


        #4
        suprsnipes,

        Please feel free to contact us any time, we monitor the forum or you can email us at support at ninjatrader dot com.
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        1 response
        9 views
        0 likes
        Last Post cre8able  
        Started by fiddich, Today, 05:25 PM
        0 responses
        3 views
        0 likes
        Last Post fiddich
        by fiddich
         
        Started by gemify, 11-11-2022, 11:52 AM
        6 responses
        804 views
        2 likes
        Last Post ultls
        by ultls
         
        Started by ScottWalsh, Today, 04:52 PM
        0 responses
        4 views
        0 likes
        Last Post ScottWalsh  
        Started by ScottWalsh, Today, 04:29 PM
        0 responses
        9 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X