NexusFi: Find Your Edge


Home Menu

 





Methods bar-related


Discussion in NinjaTrader

Updated
    1. trending_up 705 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Methods bar-related

  #1 (permalink)
user10
Dresden + Germany
 
Posts: 21 since Feb 2018
Thanks Given: 11
Thanks Received: 5

Hello to the forum,

so far I have programmed equilla. With this programming language,
I was able to develop functions that could be used by any workspace.

I would now like to develop in Ninjatrader 8 methods that avoid multiple calculations and can be used by all strategies.


I have programmed a small example with which I would like to read the number of price changes from different strategies.

 
Code
                            
// inner nested organizing class

public class Methoden
    
{
//        private int counterTest;
                
        
public static double CountDelta(double firstPricedouble secondPrice)
            {
                
int counter 1// ?? // counterTest ??
                
if (firstPrice != secondPricecounter++;
                return 
counter;
            }
        } 
Unfortunately, I get no value over 1.
How do I correctly initialize Counter?

The support tells me that a method can not be bar-related. Is that correct?

How would you solve such a problem?

Apart from time-related methods, I found no further examples of methods. Why?

Thank you for the support!

Kay


PS: The example has no special meaning; I am concerned with the question of whether and how I can count and evaluate events from different strategies.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Quantum physics & Trading dynamics
The Elite Circle
 
  #2 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,982 since Sep 2015
Thanks Given: 15,509
Thanks Received: 15,435


user10 View Post
How would you solve such a problem?

Apart from time-related methods, I found no further examples of methods. Why?

Thank you for the support!

Kay


Hi Kay,

I have moved your question to the NinjaTrader Programming section, hoping it will attract more viewers who are able to address your question.

Good luck.

Reply With Quote
Thanked by:




Last Updated on April 26, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts