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 sidlercom80, 10-28-2023, 08:49 AM
          170 responses
          2,273 views
          0 likes
          Last Post sidlercom80  
          Started by Irukandji, Yesterday, 02:53 AM
          2 responses
          17 views
          0 likes
          Last Post Irukandji  
          Started by adeelshahzad, Today, 03:54 AM
          0 responses
          3 views
          0 likes
          Last Post adeelshahzad  
          Started by CortexZenUSA, Today, 12:53 AM
          0 responses
          3 views
          0 likes
          Last Post CortexZenUSA  
          Started by CortexZenUSA, Today, 12:46 AM
          0 responses
          1 view
          0 likes
          Last Post CortexZenUSA  
          Working...
          X