Jump to content

Can someone please convert these small NT7 strategies to source


lululee

Recommended Posts

Hi All,

Can one of our finest educator convert the following to source. I like to change some peremeters and test it. Those are all hidden.

...

 

Really appreciate it...thanks in advance.

 

Lulu

Hi Lulu,

I appreciate your valuable activity and efforts in our forum. Below you can find my small gift for you. Probably, you'll be surprised.;)

[spoiler=iVKSellHold]

using System;
using System.ComponentModel;
using NinjaTrader.Data;

namespace NinjaTrader.Strategy
{
   [Description("Enter the description of your strategy here")]
   public class iVKSellHold : Strategy
   {
       protected override void Initialize()
       {
           SetTrailStop("", CalculationMode.Ticks, 30, false);
           CalculateOnBarClose=true;            
       }

       protected override void OnBarUpdate()
       {
           if (CrossBelow(CCI(240), 0.0, 1))
           {
               EnterShort(DefaultQuantity, "");
           }
           if (CrossAbove(CCI(240), 0.0, 1))
           {
               ExitShort("", "");
           }
       }
}
}

 

[spoiler=iVKsell]

using System;
using System.ComponentModel;
using NinjaTrader.Data;

namespace NinjaTrader.Strategy
{
   [Description("Enter the description of your strategy here")]
   public class iVKsell : Strategy
   {
       protected override void Initialize()
       {
           SetStopLoss("",  CalculationMode.Ticks, 20, false);
           SetProfitTarget("",  CalculationMode.Ticks, 11);
           CalculateOnBarClose=true;

       }

       protected override void OnBarUpdate()
       {
           if (CrossBelow(SMA(CCI(240), 1), SMA(CCI(240), 20), 1) && CCI(20)[0] < 0.0)
           {
               EnterShort(DefaultQuantity, "");
           }
           if (CrossAbove(SMA(CCI(240), 1), SMA(CCI(240), 20), 1))
           {
               ExitShort("", "");
           }
       }

   }
}

 

Cheers,

Link to comment
Share on other sites

Admis-

 

It would be too much to ask if you create an indicator for Nt7 that measures and alerts every 10-point move for the Emini SP500.

 

I´m finding that the 10 point rule works many days. For instance, today the sp500 did a move from 2071 to 2082. Many times I forget about this rule because I am concentrating on bookmap or other indicator, so an indicator that reminds us this rule would be very helpful.

 

I´m sure other members in this forum will appreciate it as well.

Link to comment
Share on other sites

Hi Lulu,

I appreciate your valuable activity and efforts in our forum. Below you can find my small gift for you. Probably, you'll be surprised.;)

[spoiler=iVKSellHold]

using System;
using System.ComponentModel;
using NinjaTrader.Data;

namespace NinjaTrader.Strategy
{
   [Description("Enter the description of your strategy here")]
   public class iVKSellHold : Strategy
   {
       protected override void Initialize()
       {
           SetTrailStop("", CalculationMode.Ticks, 30, false);
           CalculateOnBarClose=true;            
       }

       protected override void OnBarUpdate()
       {
           if (CrossBelow(CCI(240), 0.0, 1))
           {
               EnterShort(DefaultQuantity, "");
           }
           if (CrossAbove(CCI(240), 0.0, 1))
           {
               ExitShort("", "");
           }
       }
}
}

 

[spoiler=iVKsell]

using System;
using System.ComponentModel;
using NinjaTrader.Data;

namespace NinjaTrader.Strategy
{
   [Description("Enter the description of your strategy here")]
   public class iVKsell : Strategy
   {
       protected override void Initialize()
       {
           SetStopLoss("",  CalculationMode.Ticks, 20, false);
           SetProfitTarget("",  CalculationMode.Ticks, 11);
           CalculateOnBarClose=true;

       }

       protected override void OnBarUpdate()
       {
           if (CrossBelow(SMA(CCI(240), 1), SMA(CCI(240), 20), 1) && CCI(20)[0] < 0.0)
           {
               EnterShort(DefaultQuantity, "");
           }
           if (CrossAbove(SMA(CCI(240), 1), SMA(CCI(240), 20), 1))
           {
               ExitShort("", "");
           }
       }

   }
}

 

Cheers,

 

Thank you @admis as always. When joined this forum March 2015 lots of guys/girls helped me, so it became my moral duty to help out new comers. I am not doing anything special thou. Thank you for your kind words. You are the best :).

Link to comment
Share on other sites

its not the tools- its how you use them...

 

Totally agreed with you TB, it is how you use it and he is pretty good at using it. I am posting today's and yesterday's videos. around 3 hours each and let you all see how he is using it. Also like to apologize in advance first few minutes he don't speak so have some speaker noise. Rest of the video and audio is high quality.

 

Today's video 1.3 GB https://mega.nz/#!rUESFCza!pq9BFy19egYPjqR4rlUBrpGeAOkL_S1Uvq96IM4tgDU

 

Yesterday's video 1.25gb https://mega.nz/#!6I0BxDpZ!X47Bon5klYY_a1_lYVYF1--8QRSerQy3keoaI8iYSHQ

Link to comment
Share on other sites

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

Totally agreed with you TB, it is how you use it and he is pretty good at using it. I am posting today's and yesterday's videos. around 3 hours each and let you all see how he is using it. Also like to apologize in advance first few minutes he don't speak so have some speaker noise. Rest of the video and audio is high quality.

 

Today's video 1.3 GB https://mega.nz/#!rUESFCza!pq9BFy19egYPjqR4rlUBrpGeAOkL_S1Uvq96IM4tgDU

 

Yesterday's video 1.25gb https://mega.nz/#!6I0BxDpZ!X47Bon5klYY_a1_lYVYF1--8QRSerQy3keoaI8iYSHQ

Edited by Meow
Link to comment
Share on other sites

Thank you admis. but for iVKsell, I think one line should be corrected like this:

if (CrossBelow(SMA(CCI(240), 1), SMA(CCI(240), 20), 1) && CCI(240)[0] < 0.0)

 

I've just checked it out once again. For sure, originally it is CCI(20)[0], but thanks for your attention.

Having the sources, you can customize it by yourself...

Link to comment
Share on other sites

Admis-

 

It would be too much to ask if you create an indicator for Nt7 that measures and alerts every 10-point move for the Emini SP500.

 

I´m finding that the 10 point rule works many days. For instance, today the sp500 did a move from 2071 to 2082. Many times I forget about this rule because I am concentrating on bookmap or other indicator, so an indicator that reminds us this rule would be very helpful.

 

I´m sure other members in this forum will appreciate it as well.

 

 

I think it was asking too much.

 

Cheers to all.

I saw your request. I'm sorry, but you should keep in mind, I'm not your or I-I employee. I have a very limited time resources for helping people like you, but everything after hours. Life is brutal and most of us (I mean adults) have to pay bills, so we have to work...

Link to comment
Share on other sites

piece of advice-

no matter how much they charge for these amazing systems do not think that by getting them for free you acquire some magic-

trading with such delayed indicators is not advisable - its very good when the move is long and continues but on a sideways- chop day you will lose everything you made - plus...

Link to comment
Share on other sites

Btw

 

SMA(CCI(240), 20), 1) Is it SMA with period of 20 of CCI with period of 240 one bar ago? If that so, so what period of SMA is that one: SMA(CCI(240), 1) ?

 

This is how the SMA is structured: SMA(DataSeries, Period) -> in your example, DataSeries would be CCI(240) and the Period of the SMA would be 1.....so it would be a 1 period SMA of the 240 CCI

Link to comment
Share on other sites

Admis-

 

It would be too much to ask if you create an indicator for Nt7 that measures and alerts every 10-point move for the Emini SP500.

 

I´m finding that the 10 point rule works many days. For instance, today the sp500 did a move from 2071 to 2082. Many times I forget about this rule because I am concentrating on bookmap or other indicator, so an indicator that reminds us this rule would be very helpful.

 

I´m sure other members in this forum will appreciate it as well.

 

Here is something that you could probably use: http://ninza.co/product/market-step

Link to comment
Share on other sites

1 period SMA of 240 CCI should be like that: SMA(CCI(240), 1), 1)

 

No, I think when you copied that part of the code you didn't copy the entire thing....1 period SMA of a 240 CCI would be SMA(CCI(240), 1)[0]....The last part of your code " ,1)" is copied from this part of the code: CrossBelow(SMA(CCI(240), 1), SMA(CCI(240), 20), 1)

 

CrossBelow(IDataSeries series1, double value, int lookBackPeriod) -> So what the CrossBelow is saying is if the SMA(CCI(240), 1) crosses below the SMA(CCI(240), 20) in the last 1 bar(s), return true, else false.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...