• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need Help converting EasyLanguage Code

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

    Need Help converting EasyLanguage Code

    I am trying to move to NinjaTrader for good and converting some of own easylanguage indicators. But I am having trouble converting a portion of the code (below).

    Your input is much appreciated.
    Many thanks.


    Variables calculated elsewhere: AVG,SRATR,SRAVG,UpperZone,LowerZone;

    "tick" function is used in Tradestation but not sure of its equivalent in Ninja.

    "Xaverage" is exponential mov. avg.

    Need help converting the following portion of the easylanguage code:


    if Close>AVG and Close>UpperZone then
    begin
    X=xaverage(high-(tick*6),SRAVG);
    If (X<X[1] or (X< (X[1]+SRATR*(AvgTrueRange(10))))) then
    X=X[1] else X=X;

    end Else

    if Close<AVG and Close<LowerZone then
    begin
    X=XAverage (low+(tick*6),SRavg);
    If (X>X[1] or (X> (X[1]-SRATR*(AvgTrueRange(10))))) then
    X=X[1] else X=X;

    end else X=X[1];

    #2
    Hello iffyM,

    Welcome to the NinjaTrader Support Forums!

    While I am not very familiar with EasyLanguage, I would suggest going through our Help Guide was we do have an extensive section that goes over Basic Programming Concepts when using NinjaScript (C# and .NET based) as well as tutorials on building Indicator that will help you get up to speed on NinjaScript. The following link to our Help Guide on our Educational Section that you may view.
    http://www.ninjatrader.com/support/h..._resources.htm

    You may also view the following thread post that has other great links to get you get started.
    http://www.ninjatrader.com/support/f...86&postcount=2

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by iffyM View Post
      I am trying to move to NinjaTrader for good and converting some of own easylanguage indicators. But I am having trouble converting a portion of the code (below).

      Your input is much appreciated.
      Many thanks.


      Variables calculated elsewhere: AVG,SRATR,SRAVG,UpperZone,LowerZone;

      "tick" function is used in Tradestation but not sure of its equivalent in Ninja.

      "Xaverage" is exponential mov. avg.

      Need help converting the following portion of the easylanguage code:


      if Close>AVG and Close>UpperZone then
      begin
      X=xaverage(high-(tick*6),SRAVG);
      If (X<X[1] or (X< (X[1]+SRATR*(AvgTrueRange(10))))) then
      X=X[1] else X=X;

      end Else

      if Close<AVG and Close<LowerZone then
      begin
      X=XAverage (low+(tick*6),SRavg);
      If (X>X[1] or (X> (X[1]-SRATR*(AvgTrueRange(10))))) then
      X=X[1] else X=X;

      end else X=X[1];
      if ( Close[0] >AVG & Close[0] > UpperZone )
      {
      X = xaverage(High[0] - ( tick*6 ), SRAVG );
      if ( (X<X[1] | (X< (X[1]+SRATR*(AvgTrueRange(10))))) )
      { X=X[1] }
      else {X=X; }
      }
      else
      {
      if ( Close[0] < AVG & Close[0] < LowerZone )
      {
      X=XAverage (Low[0]+(tick*6),SRavg);
      If ( (X>X[1] | (X> (X[1]-SRATR*(AvgTrueRange(10))))) )
      { X=X[1] }
      else { X=X; }
      }
      else { X=X[1]; }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Vincere, Today, 01:59 AM
      0 responses
      4 views
      0 likes
      Last Post Vincere
      by Vincere
       
      Started by Davoone1, Yesterday, 07:28 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by Bobisam, Yesterday, 10:53 PM
      1 response
      6 views
      0 likes
      Last Post Bobisam
      by Bobisam
       
      Started by quantera, Yesterday, 05:38 PM
      0 responses
      5 views
      0 likes
      Last Post quantera  
      Started by ciro1963, Yesterday, 03:58 PM
      0 responses
      6 views
      0 likes
      Last Post ciro1963  
      Working...
      X