Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem of entry

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

    Problem of entry

    Hi,

    Sorry: I always have problems.

    I want sell when the current bid price is equals the previous price close, but the formula does not work. Someone know me indicate the error?

    if(GetCurrentBid() == Close[1])
    EnterShort();

    Thank

    #2
    germano, you're welcome - is this for backtesting or realtime trading? In backtesting GetCurrentBid() would be replaced with the Close value, so you this might be different from what you expect - http://www.ninjatrader-support.com/H...urrentBid.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand, thank you for your reply. It is for realtime trading.

      Comment


        #4
        Ok, then please post the full code you have now, in a quick test I got realtime executions for long and short trades using live ES data. Do you notice any errors in the Log tab of the Control Center?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          The strategy works, but opens the trade to the bid price corresponding to the closure of many candles ago and not to the closure of the previous candle.

          Comment


            #6
            That would depend on how you had it coded in, your example would take the Close one bar ago as reference and then place the trade on the next bar open with CalculateOnBarClose set to true. Are you talking about this 'delay'? If not, then please post a screenshot to illustrate what you see - thanks!
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I would add a picture

              Comment


                #8
                Ok looking forward to it - if it's too big for posting just send it to support at ninjatrader dot com Attn Bertrand (if it's under 3 MB, otherwise YouSendIt to our email would be great)
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Mmh... Sorry so!

                  Comment


                    #10
                    Please check your PM's - thanks!
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      I'm doing a little confusion by sending . Sorry I do not understand the e-mail address.

                      Comment


                        #12
                        Then please use the one I send you as private message here in the forums, you can directly click on this one and your email program will pick it up, thanks!
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by usazencort, Today, 01:16 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post usazencort  
                        Started by kaywai, 09-01-2023, 08:44 PM
                        5 responses
                        603 views
                        0 likes
                        Last Post NinjaTrader_Jason  
                        Started by xiinteractive, 04-09-2024, 08:08 AM
                        6 responses
                        22 views
                        0 likes
                        Last Post xiinteractive  
                        Started by Pattontje, Yesterday, 02:10 PM
                        2 responses
                        21 views
                        0 likes
                        Last Post Pattontje  
                        Started by flybuzz, 04-21-2024, 04:07 PM
                        17 responses
                        230 views
                        0 likes
                        Last Post TradingLoss  
                        Working...
                        X