NexusFi: Find Your Edge


Home Menu

 





Just a little code assist needed for entry filter


Discussion in NinjaTrader

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




 
Search this Thread
  #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?
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
White House Drops First Alien Files Today -- Market Says …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #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


© 2026 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 - Downloads - Top
no new posts