NexusFi: Find Your Edge


Home Menu

 





Incorporate ADX rule


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
 
frugalmule's Avatar
 frugalmule 
Waco, TX, USA
 
Experience: Intermediate
Platform: TradeStation
Trading: Forex
Posts: 5 since May 2013
Thanks Given: 0
Thanks Received: 1

Mike, thank you for the earlier communications. My Elite Membership has been paid and I would greatly appreciate any assistance with this. - 6-28-13 at 4:50 CST

I need to amend the strategy below as follows:

It should not allow any new trade or exit (long or short) to be triggered unless ADX is first above 20 before the trigger occurs.
It also should hold positions throughout the day but not hold any positions overnight.

Assistance is greatly appreciated.

 
Code
{062713 TRP and TS Support Convert Aroon Oscillator to Strategy}

{ Reference: Tushar S. Chande, "A Time Price Oscillator", Technical Analysis of   
  Stocks & Commodities, V. 13:9 (369-374) }  
  
inputs:  
	int AroonLength( 25 ) ;  // Aroon length  
 
{ 
Started with the built-in Aroon Oscillator indicator.  Converted it to a strategy 
by: 
 
1) Remove all plot statements - these do not work in strategies 
2) Converting Alerts to entries or exits 
} 
	   
variables:  
	double AroonOscValue( 0 ),  
	bool EntryCondition( false) ;  
  
//  Calc the Aroon Oscillator value using the built-in AroonOsc function 
AroonOscValue = AroonOsc( AroonLength ) ;  
 
//  Check that we are past the first bar of the chart to prevent spurious entries 
if CurrentBar > 1 then begin  
 
	//  Cross over zero triggers long entry or reversal from short to long 
	if AroonOscValue crosses over 0 then  
		Buy at next bar at market 
		 
	//  Cross under zero triggers short entry or reversal from long to short 
	else if AroonOscValue crosses under 0 then  	 
		SellShort at next bar at market ; 
 
end ;


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The Ceasefire Curve: 2pct Peace by Next Week, 60pct by S …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
TradingView Deploys AI to Monitor SEC Filings in Real Ti …
TradingView
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks




Last Updated on June 28, 2013


© 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