Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriceType

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

    PriceType

    I was working on a strategy and changed the indicator code to include the pricetype (close, open, low, high, median, etc)
    The strategy returned different results a few days before. I could get the strategy code at the time from the log, however it still returns a different result. The only difference I see in the 2 is the parameters for the PriceType. It looks like it would pass 0 for the PriceType with the old indicator code, and now it passes 'Close'
    I don't know how to change it back to the old code. Can someone please help?
    Click image for larger version

Name:	PriceType-Close.jpg
Views:	99
Size:	12.3 KB
ID:	1257484

    Click image for larger version  Name:	PriceType-0.jpg Views:	2 Size:	14.5 KB ID:	1257482
    Attached Files
    Last edited by Graci117; 06-25-2023, 10:19 AM.

    #2
    Now I am more confused. I have a very old computer where I have an very old version of the indicator. I copied the strategy to the other computer and it still returned better result (not exactly the same). On my other computer the playback data and historical data I have downloaded is definitely different. I even copied the indicator from the old computer and renamed it and save it on the computer where I originally am having issues, and the p/l is still very different. Could it be the data?



    Comment


      #3
      Hello Graci117,

      Thanks for your post.

      How exactly is the indicator being defined in the script?

      To pass the Close price to the indicator for calculations, you would set the input parameter to Close when defining the indicator.

      For example: EMA(Close, 20)[0];

      To pass the High price to the indicator for calculations, you could set the input parameter to High, and so on.

      For example: EMA(High, 20)[0];

      Note that the input parameter defines what source data is used for the indicator's calculations.

      Further, yes if the data being used is different between computers then the results you see will also be different. Typically, same exact data + same exact code and settings = same results.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      43 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      48 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X