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

Draw Arrow if Bar Over Certain Pip Size

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

    Draw Arrow if Bar Over Certain Pip Size

    Hi

    I'm struggling to get even the simplest scripts to run here. I have some 5 minute data from IB for the currency pair GBP/USD. The pair is loaded into the strategy analyser and I can right click the pair to run a back test, pull up a chart, etc. I've got a simple script as follows to print some text if a bar high is greater than the low (text on every bar right?) but still nothing prints on the chart after the test is run.

    Script:

    if (High[0] > Low[0])
    {
    DrawText(
    "My text" + CurrentBar, "here", 0, 0, Color.Red);
    }


    So can someone help me get the basics working for me here and get the text or an arrow to print on backtest, and secondly, how would I code this strategy so that I can identify bars over a certain pip size?

    From then on I should be able to figure the rest out.

    Thanks

    #2
    Draw Arrow if Bar Over Certain Pip Size

    Use the Strategy wizard
    1 Create new strategy
    2) High > Low (use offset here to show large pip size)
    3) Go to bottom pane "Do the following"
    4) Click "add"
    5) Click "drawing"
    6) Click "up arrow"
    7) Click "Y" and select where you want arrow to appear (Example low of bar)
    8) Click next until done

    The strategy wizard is easier to use than indicator wizard. Trt it I think you will see it is easy to make fairly complex strategies

    I hope this helps

    Comment


      #3
      Originally posted by ninjablanks View Post
      Use the Strategy wizard
      1 Create new strategy
      2) High > Low (use offset here to show large pip size)
      3) Go to bottom pane "Do the following"
      4) Click "add"
      5) Click "drawing"
      6) Click "up arrow"
      7) Click "Y" and select where you want arrow to appear (Example low of bar)
      8) Click next until done

      The strategy wizard is easier to use than indicator wizard. Trt it I think you will see it is easy to make fairly complex strategies

      I hope this helps
      And its working

      Thanks very much, appreciate your time.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lightsun47, Today, 03:51 PM
      0 responses
      4 views
      0 likes
      Last Post lightsun47  
      Started by 00nevest, Today, 02:27 PM
      1 response
      8 views
      0 likes
      Last Post 00nevest  
      Started by futtrader, 04-21-2024, 01:50 AM
      4 responses
      44 views
      0 likes
      Last Post futtrader  
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      13 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      9 views
      0 likes
      Last Post port119
      by port119
       
      Working...
      X