Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit Target (Cash) in Forex

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

    Profit Target (Cash) in Forex

    Hello,

    I'm testing out the Profit Target Total Position (Cash) function in the NinjaScript editor, and I need some assistance in understanding how it is calculated.

    For background, I'm testing a forex strategy, and I want to get $100 profit per trade.

    Would the "SetProfitTarget(100)" be the appropriate command or is there some other way this would be coded?

    Please let me know if you need any other information.

    Thanks.

    #2
    Syrinxgroup,

    I am happy to assist you.

    Yes, that would be 100 dollars in profit. SetProfitTarget() with 1 input variable expects a double (decimal) currency value.

    For more information, please see the following link : http://www.ninjatrader.com/support/h...ofittarget.htm

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

    Comment


      #3
      Adam,

      Thanks for your reply.

      Unfortunately, I'm not a programmer, and some of what you said was well beyond me.

      Could you please clarify, if possible, what "1 input variable expects a double (decimal) currency value" means is simpler language? I'm sorry if this sounds like an elementary question.

      Regards,
      Neel.

      Comment


        #4
        Syrinxgroup,

        Sure, no problem.

        In programming, a "double" variable is essentially a decimal number, such as 3.14159 . There are other data types as well such as "int" for integer (i.e. -2,-1,0,1,2,...), "bool" for boolean which is true or false, and many other data types.

        Essentially, SetProfitTarget(100.01) will set your profit target at 100 dollars and 1 cents in currency.

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

        Comment


          #5
          Thanks, I think I get it now. I'll get in touch if I have any other questions. Appreciate the help.

          Regards,
          Neel.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          69 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          42 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          54 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X