NexusFi: Find Your Edge


Home Menu

 





Methods bar-related


Discussion in NinjaTrader

Updated
    1. trending_up 704 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?
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
32 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #2 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,973 since Sep 2015
Thanks Given: 15,492
Thanks Received: 15,386


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