Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Want to Work with a Programmer --- Need EasyLanguage Code Converted to NT Indicator

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

    Want to Work with a Programmer --- Need EasyLanguage Code Converted to NT Indicator

    I'd like to work with someone on an indicator that I have in EasyLanguage. We just need to move it over to NT and do some tweaks. Anybody want to work with me on this? Will give more details if interested. PM me or post here.

    #2
    Hello lllusion,

    Thank-you for your post. We do not offer custom programming but we will leave this thread open for others users willing to assist.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul.

      Comment


        #4
        I'd like to work with someone on an indicator that I have in EasyLanguage. We just need to move it over to NT and do some tweaks. Anybody want to work with me on this? Will give more details if interested. PM me or post here.
        Hi Illusion

        May I make a suggestion? Would it be possible to post the EasyLanguage code for this ind so people can see what's involved?

        (Personally, I know nothing about EasyLanguage but maybe it's possible to follow the coding logic if it's not too complex.)

        Comment


          #5
          Yeah sure, it's just some RSI indicator that is printed for pivots. I saw it posted on Sierra Chart's forums via a google search because I was looking for an RSI pivot indicator. Yet there aren't any for NT currently as far as I know.

          Let me know if a conversion looks doable.

          Code:
          Inputs:
          Length(7),
          Price((o+c)/2),
          Mult(0.0005);
          
          Inputs:
          MarkPlain(true),
          MarkDiver(true),
          MarkRevDiver(true),
          MarkSupport(true),
          MarkResistance(true),
          DrawHLines(true);
          
          Variables:
          k_15(15),
          k_50(50), 
          RSIWAvg(0);
          
          Variables:
          lastRSIAtPivotLo(0),lastPriceAtPivotLo(0),lastLoAtPivotLo(0),
          lastRSIAtPivotHi(0),lastPriceAtPivotHi(0),lastHiAtPivotHi(0);
          
          { figure out long/short threshold }
          
          Variables:
          idx(0),
          RSIAvg(0),
          longThreshold(0),
          shrtThreshold(0),
          _RSI(0);
          
          Variables:
          alertTextID(-1);
          
          Variables:
          lngDiverColor(green),
          lngRSIColor(darkgreen),
          lngRevDiverColor(cyan);
          
          Variables:
          srtDiverColor(red),
          srtRSIColor(darkred),
          srtRevDiverColor(yellow);
          
          Variables:
          PColor(0),
          TextFlag(False),
          AlertMsg("");
          
          Variables:
          pRSIWAvg_lThres(False),
          pRSIWAvg_sThres(False);
          
          Variables:
          WasLBarRSIPivotHigh(False),
          WasLBarRSIPivotLow(False),
          WeAreRSIDiverL(False),
          WeAreRSIDiverS(False),
          WeAreRSILong(False),
          WeAreRSIShort(False),
          WeAreRSIDiverRevL(False),
          WeAreRSIDiverRevS(False),
          PlotAShortPosition(False),
          PlotALongPosition(False);
          
          _RSI = RSI(Price,Length);
          RSIAvg	= Average(_RSI,k_50);
          RSIWAvg	= WAverage(_RSI,3);
          longThreshold = 60 - (100-RSIAvg)/1.68;
          shrtThreshold = 40 + (RSIAvg)/1.68;
          
          { Common Conditions }
          
          pRSIWAvg_lThres=RSIWAvg[1] < (longThreshold + k_15);
          pRSIWAvg_sThres=RSIWAvg[1] > (shrtThreshold - k_15);	// let's just calculate it once
          
          { Long Condition SetUps }
          
          WasLBarRSIPivotLow=	RSIWAvg[1] < RSIWAvg And CountIf(RSIWAvg[1] < RSIWAvg[2],3)=3;
          
          WeAreRSIDiverL=	pRSIWAvg_lThres and { RSI was "low enough" look for divergence }
          Price < lastPriceAtPivotLo and { price was higher in last RSI pivot low, but }
          LastRSIAtPivotLo < _RSI and MarkDiver; { RSI was lower => divergence }
          
          WeAreRSILong=	RSIWAvg[1] < longThreshold and MarkPlain;	{ no divergence, but RSI very low, and so it's worth noting }
          
          WeAreRSIDiverRevL=	pRSIWAvg_sThres AND { RSI was "high enough" } { a pivot low while RSI reading is high, look for rev divergence }
          Price > lastPriceAtPivotLo AND	{ price was higher in last RSI pivot low, but }
          LastRSIAtPivotLo < _RSI and MarkRevDiver; { RSI was lower => rev divergence }
          
          PlotALongPosition=WeAreRSIDiverL or WeAreRSILong or WeAreRSIDiverRevL;
          
          { Short Condition SetUps }
          
          WasLBarRSIPivotHigh=RSIWAvg[1] > RSIWAvg And CountIf(RSIWAvg[1] > RSIWAvg[2],3)=3; { last bar was a RSI pivot high }
          
          WeAreRSIDiverS=	pRSIWAvg_sThres and { RSI was "high enough" for a pivot high, look for divergence }
          Price > lastPriceAtPivotHi and	{ price was higher in last RSI pivot high, but }
          lastRSIAtPivotHi > _RSI and MarkDiver;	{ RSI was higher => divergence }
          
          WeAreRSIShort=	RSIWAvg[1] > shrtThreshold and MarkPlain;	{ no divergence, but RSI very high, and so it's worth noting }
          
          WeAreRSIDiverRevS=	pRSIWAvg_lThres and { RSI was "low enough" } { a pivot high while RSI reading is low, look for rev divergence }
          Price < lastPriceAtPivotHi and { price was lower in last RSI pivot high, but }
          lastRSIAtPivotHi > _RSI and MarkRevDiver; { RSI was higher => rev divergence }
          
          PlotAShortPosition=WeAreRSIDiverS or WeAreRSIShort or WeAreRSIDiverRevS;
          
          { Let the Code flow }
          
          If CurrentBar = 1 then AlertTextID = Text_New(date,time,0,"RSI");
          
          { drawing related variables }
          
          { long signal } 
          
          If WasLBarRSIPivotLow Then	{ last bar was a RSI pivot low }
          Begin
          
          If WeAreRSIDiverL Then 
          begin
          PColor=lngDiverColor;	{ plot a "significant" long signal }
          AlertMsg="RSI diver long";
          end else
          if WeAreRSILong then
          begin
          PColor=lngRSIColor;	{ plot a normal long signal }	
          AlertMsg="RSI long";
          end else
          if WeAreRSIDiverRevL Then
          Begin
          PColor=lngRevDiverColor;
          AlertMsg="RSI rev diver long";
          End;
          
          If PlotALongPosition Then	{ Some long condition wants to Plot }
          Begin	
          Plot1(L-L*mult,"long",PColor);
          If Text_GetTime(alertTextID) <> time then
          Begin
          text_setLocation(alertTextID, date, time, 0);
          alert(AlertMsg);
          End;
          End;
          
          lastPriceAtPivotLo = Price;
          lastLoAtPivotLo = L;
          lastRSIAtPivotLo = _RSI;
          
          End;	{ WasLastBarRSIPivotLow }
          
          If DrawHLines Then
          Begin
          
          If lastLoAtPivotLo <> 0 and MarkSupport then
          begin
          Plot3(lastLoAtPivotLo,"lastL@pivotL");
          if lastLoAtPivotLo <> lastLoAtPivotLo[1] and Text_GetTime(alertTextID) <> time then
          begin
          AlertMsg="RSI support";
          TextFlag=True;
          end;
          end;
          
          If lastHiAtPivotHi <> 0 and MarkResistance then
          Begin
          Plot4(lastHiAtPivotHi,"lastH@pivotH");
          if lastHiAtPivotHi <> lastHiAtPivotHi[1] and Text_GetTime(alertTextID) <> time then
          begin
          AlertMsg="RSI resistance";
          TextFlag=True;
          End;
          End;
          End;
          
          If Text_GetTime(alertTextID) <> time Then
          Begin
          If close crosses below lastLoAtPivotLo then
          begin
          AlertMsg="Below support";
          TextFlag=True;
          end Else
          if close crosses above lastHiAtPivotHi then
          Begin
          AlertMsg="Above resistance";
          TextFlag=True;
          end;
          End;	
          
          If TextFlag Then
          Begin
          text_setLocation(alertTextID, date, time, 0);
          Alert(AlertMsg);
          TextFlag=False;
          End;
          
          { short signal }
          
          If WasLBarRSIPivotHigh Then	{ last bar was a RSI pivot high }
          Begin
          If WeAreRSIDiverS Then	{ plot a "significant" short signal }
          Begin
          PColor=srtDiverColor;
          AlertMsg="RSI diver short";
          end else
          if WeAreRSIShort then	{ plot a normal short signal }
          begin
          PColor=srtRSIColor;
          AlertMsg="RSI short";
          end Else
          If WeAreRSIDiverRevS Then
          Begin
          PColor=srtRevDiverColor;
          AlertMsg="RSI rev diver short";
          end;
          
          If PlotAShortPosition Then	{ Some short condition wants to Plot }
          Begin
          Plot2(H+H*mult,"short",PColor);
          If Text_GetTime(alertTextID) <> time then
          Begin
          text_setLocation(alertTextID, date, time, 0);
          Alert(AlertMsg);
          End;
          End;
          
          lastPriceAtPivotHi = Price;
          lastHiAtPivotHi = H;
          lastRSIAtPivotHi = _RSI;
          
          End; { WasLastBarRSIPivotHigh }

          Comment


            #6
            Yeah sure, it's just some RSI indicator that is printed for pivots. I saw it posted on Sierra Chart's forums via a google search because I was looking for an RSI pivot indicator. Yet there aren't any for NT currently as far as I know.

            Let me know if a conversion looks doable.
            Thanks. This is pretty complex and I think you'd need an EL expert to help you.

            So, personally, I couldn't help, but others, seeing the code, may be able to.

            However, it may be an idea to describe precisely what this ind sets out to achieve because someone might be able to work something up in Ninja without any reference to the EL original.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by KenneGaray, Today, 03:48 AM
            0 responses
            3 views
            0 likes
            Last Post KenneGaray  
            Started by thanajo, 05-04-2021, 02:11 AM
            4 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by aa731, Today, 02:54 AM
            0 responses
            4 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            10 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,237 views
            0 likes
            Last Post sidlercom80  
            Working...
            X