Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

I lost but Robot won how?

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

    I lost but Robot won how?

    I have one strategy builder file that does trades
    and one that draws the take profit (light green) and stops loss (dark green)

    I was trading live today, and I lost
    when the tick passed the dark green area, it took my stop loss

    but the robot won. I don't understand how

    the logic is fine, the robot waited for the red candle to close, then it tested the logic
    Default input[0] <= StopLoss then ExitLong

    I calculate by close, if I calculate by "On each tick", then the robot will see my stop loss?

    how can I get the robot to see the tick price?
    Attached Files
    Last edited by AaronKoRn; 05-19-2021, 10:28 PM. Reason: clarity

    #2
    Hello AaronKoRn,

    From the details it sounds like you are running two separate strategies, is that correct?

    If so there is the possibility that the two would work differently when run side by side. They also should not be able to communicate, for example a second strategy will not observe any of the orders from the first strategy.

    The OnEachTick setting would allow the strategy to process its logic for each tick. If you have programmed the strategy in a way that works with OnEachTick Processing you could try that as well.

    ​​​​​​​Please let me know if I may be of additional assistance.

    Comment


      #3
      Yes I have 2 strategies. I dont need them to communicate.

      I just need the trade robot strategy to see the tick price

      how would I do something like

      if Tick Price > EMA(21) then Exit Long

      I know how to do the EMA, and Exit part but not the Tick Price
      Attached Files

      Comment


        #4
        Hello AaronKoRn,

        You could use OnEachTick processing for that. In the condition you can reference the Close price of 0 BarsAgo and that would be the current price in realtime.

        I look forward to being of further assistance.

        Comment


          #5
          I tried that, but when send the exit signal it looks like it is still waiting for the bar to close.

          im using the basic exit shot option

          there are others, limit, market, e.t.c

          which one should I use?

          Comment


            #6
            Hello AaronKoRn,

            Have you tried using a Print as an action to confirm the condition is become true on each tick? You could add a print as an action along with the exit and then use the NinjaScript output window to see in realtime when the condition is true.

            I look forward to being of further assistance.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            65 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            139 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            75 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X