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 cmoran13, Yesterday, 01:02 PM
      0 responses
      30 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      22 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      160 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      95 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      148 views
      2 likes
      Last Post CaptainJack  
      Working...
      X