Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need integer number of pips

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

    Need integer number of pips

    Hello,

    für my strategy I will need the integer number of pips:

    risk_long = GetCurrentBid() - Swing(SWValue).SwingLow[0];

    risk_long_pip1 = risk_long * 10000;
    risk_long_pip1 = Math.Round(risk_long_pip1);

    GainLong1 = risk_long_pip1;

    #region Variables
    .....
    private double risk_long = 0;
    private double risk_long_pip1 = 0;
    private double gainLong1 = 0;
    .....

    #region LONG Entry and Profit:
    -----
    if ......
    {
    EnterLongStop((int)(PTLongTA1*1000), High[0], "Long1");
    .....
    }

    Where ist the problem?

    Thanks für your support..
    Andrew

    #2
    this is the profit exit:

    if (Position.MarketPosition == MarketPosition.Long
    && GetCurrentBid() >= Position.AvgPrice + GainLong1*TickSize)

    Comment


      #3
      Hello Blackburn,

      Thank you for writing in. To help narrow down the problem, could you please let me know what error message you are getting or what exactly is happening when you run your strategy?

      Thank you in advance.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Hello Michael,

        for better understanding I´m sending you a picture and the cs-file.

        World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.



        Andrew
        Attached Files

        Comment


          #5
          Hello Blackburn,

          Unfortunately I still do not understand what the issue is. Could you please explain the following:

          1. What exactly you are trying to accomplish

          2. What is happening with the code you are using

          With this information I will be able to provide you with a complete answer.

          Thank you in advance.
          Michael M.NinjaTrader Quality Assurance

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X