Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Breakeven point in TS

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

    Breakeven point in TS

    Hi,
    I'm trying to find a way to convert TS strategy to NT functions for automatic trading so I am wondering if the following code for breakeven stop is correct or maybe anyone could suggest a better way to do this?

    if NTConnected(1) then begin
    if NTMarketPosition("") = -1 then begin
    if BeNT_sell = entryprice - (BreakEven/PointValue/PriceScale) then begin
    NTSlossShort = NTBuyStop("",1,entryprice);
    end;
    end;
    end;

    some explanation:
    the scripts is executing usual TS strategy and in addition to that it also sends NT orders (I'd like to see what's happening on the chart).
    So essentially entryprice is defined with the TS strategy and then used for NT.
    entryprice - (BreakEven/PointValue/PriceScale) means for example 0.8728-0.0030 if breakeven point is 30 pips

    #2
    Unfortunately I am not an EL expert so I can't verify that your code will work as you expect. However, with NT you can send orders to the Sim101 account for real-time simulation. Testing your strategy in this manner will surely tell you if you are getting the results you expect.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DavidHP, Today, 07:56 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by kujista, Today, 06:23 AM
    3 responses
    6 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Mindset, Yesterday, 02:04 AM
    2 responses
    18 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by f.saeidi, Today, 08:03 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by samish18, 04-17-2024, 08:57 AM
    15 responses
    53 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X