Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

nt8b* - stoptargethandling q?

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

    nt8b* - stoptargethandling q?



    This is in Playback-MR.

    Doing some extensive testing and adding to my strategy this past week, and I increased EntriesPerDirection to 2.

    In a strategy, I have 1 market order entry, and then say later on, based on another condition, I enter Long again.

    This is using the same named entry as the previous entry, so I thought or hoped it would use the same targets for profit and stoploss.

    But it appears to be using it's own unique values.

    I thought changing stoptargethandling would affect this - but it appears it does not.

    So is there anyway to tag along this new entry on the target/stoploss of previous named entry without having to save it and reset it after new entry on same tag?

    I'm also kind of confused.

    In the code below - I set it in State.SetDefaults.

    When I disable the strategy - and then EDIT the strategy in the Control Center strategy tab - it shows "Stop & Target submission .... Per Entry Execution"...So I'm not sure if ByStrategyPosition is even being used. (Entries Per direction is showing 2).

    I haven't done this before(in NT7), so this is a new area for me... so wasn't sure what to expect.

    Thoughts? Suggestions? Is this a bug?


    Code:
    			if (State == State.SetDefaults)
    			{
    				Description					= @"Enter the description for your new custom Strategy here.";
    				Name						= "stoploss_test";
    				Calculate					= Calculate.OnEachTick;
    				EntriesPerDirection			= 2;
    				EntryHandling				= EntryHandling.AllEntries;
    				IsExitOnSessionCloseStrategy		= false;
    				ExitOnSessionCloseSeconds			= 30;
    				IsFillLimitOnTouch			= false;
    				MaximumBarsLookBack			= MaximumBarsLookBack.TwoHundredFiftySix;
    				OrderFillResolution			= OrderFillResolution.Standard;
    				Slippage					= 0;
    				StartBehavior				= StartBehavior.WaitUntilFlat;
    				TimeInForce					= TimeInForce.Gtc;
    				TraceOrders					= false;
    				RealtimeErrorHandling		= RealtimeErrorHandling.StopCancelClose;
    				StopTargetHandling			= StopTargetHandling.ByStrategyPosition;

    #2
    Hello,

    Thank you for the question.

    I wanted to check, what unique values are you seeing for the stop you are setting? I am unsure by the description on exactly what you are seeing or is happening. If you are using the SetStopLoss method with an amount of Ticks, I would expect different prices for the two stops if they happen at two different times.

    I put together a simple script just to test using the same signal name for multiple entries per direction, my test had included a second condition which becomes true after the first so my stops were submitted at very close prices but not exact. Is this the kind of unique values you are referring to? Otherwise this test seemed successful regarding using the same signal name for the stops.

    If not could you provide a more complete sample or more information on what specific code is being used for the stop as you did not say, are you using SetStopLoss from State.Configure or in OnBarUpdate?



    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, Today, 06:46 AM
    0 responses
    8 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, Yesterday, 05:21 PM
    0 responses
    14 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    15 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    82 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    48 views
    0 likes
    Last Post PaulMohn  
    Working...
    X