Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator logic & lot sizes

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

    Indicator logic & lot sizes

    Hi, I'm just dabbling in the strategy builder and I'm looking for a "close below" option but the closes option I see is "crosses below".

    However this isn't very good for me because I need the strategy to place a sell or buy when the entire bar is completely closed below or above the indicator. These are a few times when a trade is placed when the bar only only just peaks above or below the indicator. https://i.gyazo.com/f81a8c8a21d345a4...00b8a7198b.png for example.

    Also I have highlighted the stats from the performance test and they seem good but for some reason the profit is absolutely tiny https://i.gyazo.com/ff95b0f589549c26...8dffd2c9bb.png.

    How can I change the lot size my strategy trades? I think I'm literally trading like 1 microlot per trade or something?

    Thank you kindly.

    #2
    Hello matty89,

    The default crossing conditions would relate to a single price crossing another single price within a lookback period, what you are asking for would require 4 prices or the OHLC prices to be checked.

    For this type of crossing you would likely need to check that all of the OHLC prices have crossed the indicator rather than just one of the bars prices. If you were to do that using the CrossAbove or Below conditions you would also likely need to add more bars to the lookback period. In your example image the cross below would not have worked with 1 lookback period because some of the bar was already crossed prior to being completely below the indicator value. In that case 2 bars lookback would have been needed in addition to checking that all 4 of the OHLC had crossed below.


    For the performance question, it sounds like that was a forex instrument being used. Forex would require the full lot amount like 10000, a tiny profit like this while still seeing trades is usually related to forex and the quantity used.

    You can change the amount in the User interface when you configure the strategy or in the strategies code.
    To change it from the user interface, when applying the strategy scroll down in its properties and look for " Order Properties -> Set order quantity". Change this from Strategy to Default Quantity and then enter the amount.
    To do this in the script you would enter the value when you configure the order. In the Action where you have the order methods you would edit it and type in the quantity where it shows DefaultQuantity.

    I look forward to being of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello matty89,

      The default crossing conditions would relate to a single price crossing another single price within a lookback period, what you are asking for would require 4 prices or the OHLC prices to be checked.

      For this type of crossing you would likely need to check that all of the OHLC prices have crossed the indicator rather than just one of the bars prices. If you were to do that using the CrossAbove or Below conditions you would also likely need to add more bars to the lookback period. In your example image the cross below would not have worked with 1 lookback period because some of the bar was already crossed prior to being completely below the indicator value. In that case 2 bars lookback would have been needed in addition to checking that all 4 of the OHLC had crossed below.


      For the performance question, it sounds like that was a forex instrument being used. Forex would require the full lot amount like 10000, a tiny profit like this while still seeing trades is usually related to forex and the quantity used.

      You can change the amount in the User interface when you configure the strategy or in the strategies code.
      To change it from the user interface, when applying the strategy scroll down in its properties and look for " Order Properties -> Set order quantity". Change this from Strategy to Default Quantity and then enter the amount.
      To do this in the script you would enter the value when you configure the order. In the Action where you have the order methods you would edit it and type in the quantity where it shows DefaultQuantity.

      I look forward to being of further assistance.
      We have lift off! https://i.gyazo.com/7177321aa25c68e4...f35c7d7c80.png

      Thank you very much for the help.

      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
      44 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