Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Stop & target Submission

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

  • Plaket
    replied
    Thank you!

    All is clear now.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Plaket,

    The issue here is that you are calling SetStopLoss with the Currency overload. When this is used, the StopLoss will be for the entire position.
    Because of this, the stop and target cannot be set per entry.

    Instead, you would want to use a CalculationMode in your overload parameter so that the stop loss will be for individual entries instead of the entire position.
    http://www.ninjatrader.com/support/h...etstoploss.htm

    Leave a comment:


  • Plaket
    replied
    You are so kind Chelsea.

    Thank you for the video. The point is that I don't have problems with this set up. I can set up ByStrategyPoistion correctly without problems. I have problems when I try to turn it to PerEntryExecution. please, could you check if you are able to turn it to PerEntryExecution? I need this last one option.

    Thank you in advance.
    Last edited by Plaket; 10-21-2014, 10:11 AM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi Plaket,

    Thank you for the script.

    I was not able to reproduce this behavior.

    Below is a link to a video of my attempt to reproduce this.
    http://screencast.com/t/S2WXOgEL

    I'd like to schedule a call with you to investigate this on your end. Please send an email to platformsupport [at] ninjatrader [dot] com. In the email, please add a link to this forum thread.

    Leave a comment:


  • Plaket
    replied
    Of course Chelsea,

    Here it is.

    Thank you in advance.
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi Plaket,

    May I test this code on my end?

    To export your script do the following:
    1. Click File -> Utilities -> Export NinjaScript
    2. Enter a unique name for the file in the value for 'File name:'
    3. Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
    4. Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


    Below is a link to the help guide on Exporting NinjaScripts.
    http://www.ninjatrader.com/support/h...nt7/export.htm


    Please attach the export to your next post (or if you would like to keep the script private let me know and I will have you email it to support).

    Leave a comment:


  • Plaket
    replied
    No, this behavior is not happening with the SampleMACrossOver. Just with this code, but as you can see is a very simple code, for that reason I can't udnerstand the reason of it. I developed the script.

    Is there anything I can change in order to solve it?

    The point is that I have a hard code showing the same problem, for that reason I did a easier code to show you the problem. I am sure that If I programm this simple code again I am not going to have this problem, but I would like to find the mistake in order to correct the other long script /hard code.

    Thank you in advance.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi Plaket,

    Does this behavior also happen with the SampleMACrossOver script as well?

    Did you create this script or was this script imported?

    Leave a comment:


  • Plaket
    replied
    Thank you for the answer Chelsea,

    Yes of course I did it.

    The point here is that, I can turn it from ByStrategyPosition to PerEntryExecution before to enable. But it doesn't work. As soon as I enable the strategy this point turn again ByStrategyPosition.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi Plaket,

    Have you tried setting this before enabling the script?

    Once enabled, a scripts parameters cannot be changed.

    Leave a comment:


  • Plaket
    started a topic Stop & target Submission

    Stop & target Submission

    Hi,

    I have developed this easy code (you can watch it on the code file).

    The problem is that if I run this strategy in real time I can't change the option "Stop & Target Submission" in Order Handling (as you can see on the sencond screenshot). I always have ByStrategyPosition, but I need PerEntryExecution.

    Is there something wrong with the code? What do I need in order to change that set up?

    Thank you in advance.
    Attached Files
    Last edited by Plaket; 10-21-2014, 08:18 AM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by fx.practic, 10-15-2013, 12:53 AM
5 responses
5,404 views
0 likes
Last Post Bidder
by Bidder
 
Started by Shai Samuel, 07-02-2022, 02:46 PM
4 responses
95 views
0 likes
Last Post Bidder
by Bidder
 
Started by DJ888, Yesterday, 10:57 PM
0 responses
8 views
0 likes
Last Post DJ888
by DJ888
 
Started by MacDad, 02-25-2024, 11:48 PM
7 responses
159 views
0 likes
Last Post loganjarosz123  
Started by Belfortbucks, Yesterday, 09:29 PM
0 responses
8 views
0 likes
Last Post Belfortbucks  
Working...
X