NexusFi: Find Your Edge


Home Menu

 





Just a little code assist needed for entry filter


Discussion in NinjaTrader

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




 
Search this Thread

Just a little code assist needed for entry filter

  #1 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Greets!

This is likely easy ... just cant yet get my head around it. I want to test an entry filter BarsArray==0, NT7, and did get almost there, but cant figure out the final step on how to calculate iGoShortETOPtest so I can test it against iGoShortETOPtotal


 
Code
                            
// ENTER SHORT WHEN 
// (( ETOP #bars) * (ETOP average value for ETOPperiod)) >= (ETOPtotal) 
// so.... filter will be iGoShortETOPtest >= iGoShortETOPtotal


// - this section all good to use 

private int iGoShortETOPperiod 5;
[
Description("[SHORT Enter] Period Length for ETOP - Minimum 5")]
[
GridCategory("[SHORT Enter]eTOP)"]
[
Gui.Design.DisplayName ("1.a Period Length for ETOP to GO SHORT")]
public 
int GoShortETOPperiod

get { return iGoShortETOPperiod; } 
set iGoShortETOPperiod Math.Max(3value); } 


private 
double iGoShortETOPtotal 0.5;
[
Description("[SHORT Enter] TOTAL value for ETOP - Minimum -.5")]
[
GridCategory("[SHORT Enter]eTOP)"]
[
Gui.Design.DisplayName ("1.b TOTAL value for ETOP to GO SHORT")]
public 
double GoShortETOPtotal 
{
get { return iGoShortETOPtotal; } 
set iGoShortETOPtotal Math.Max(0.5value); }
}

private 
int iGoShortETOPbars 3;
[
Description("[SHORT Enter] #Bars for ETOP - Minimum 3")]
[
GridCategory("[SHORT Enter]eTOP)"]
[
Gui.Design.DisplayName ("1.c #Bars maximum totaled for ETOP to GO SHORT")]
public 
int GoShortETOPbars

get { return iGoShortETOPbars; } 
set iGoShortETOPbars Math.Max(3value); } 
}
// --------------------------

//This is the part where my brain is too confused to resolve correctly, and really 
//                      annoying me greatly ...
//(btw, 4 decimal places expected in ETOP output) .. 
//dataseries setup? double?? OnBarUpdate or OnStartUp ??
// VERY explicit code assist is really needed .. is there more than 1 right answer?

iGoShortETOPtest = (iGoShortETOPbars * (ETOP(iGoShortETOPperiod)[0])) 
Thanks mightly for assist!
TJ

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quant vue
Trading Reviews and Vendors
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


I think the third cup of java and 5 spoons of sugar helped ... fixed the code I think

Jon

Started this thread Reply With Quote




Last Updated on October 27, 2010


© 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