Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Where to start

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

    Where to start

    G'Day All,
    Greetings and best wishes.

    I am trying to get started with writing my own script. Many many years ago I wrote some dbase and FoxBase code and have recently dabbled with php, so I have some conceptual ideas of scripting.

    I am now looking for pointers in getting started with writing a simple script as follows:

    Place on a 5 minute chart.
    01 - Find the close of 5 minute bar at 16:00 yesterday, write the value to a variable, put a coloured dot on chart

    02 - Find the close of 5 minute bar at 07:20 today, write the value to a variable, put a different coloured dot on chart.

    03 - If 02 is higher than 01, add XX number of ticks to 02 and place a sell stop with a Profit target of 8 ticks and a stop of 5 ticks.

    I am sure that there will be many other variables that will need to be decleared but, for the time being, I would like to start here.

    Many thanks for your attention and please send any information that might set me on the right path.

    Thanks and warm regards.

    #2
    Ferg., welcome to our forums!

    For a general overview and getting started in NinjaScript those tutorials are very helpful -



    For 'finding' your 'closes' you can use the GetBar() method as shown here -



    For a Sell Stop order, please use the EnterShortStop method -



    For the Profit Target, please use SetProfitTarget -



    For the Stop Loss, please use SetStopLoss -

    Comment


      #3
      G'Day Bertrand,
      Many thanks for the pointers. I will dig into them. Stay tuned for more questions.

      Warm Regards.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      66 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X