NexusFi: Find Your Edge


Home Menu

 





Code Strategy With Criteria to be met


Discussion in ThinkOrSwim

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




 
Search this Thread
  #1 (permalink)
jojowoods83
Baltimore, Maryland
 
Posts: 7 since May 2018
Thanks Given: 6
Thanks Received: 2

Hello, would someone be able to code the following strategy with the following criteria? Any help is much appreciated!

The strategy is as follows:

Indicators used:
1. ADX -- Default settings
2. RSI -- Default Settings
3. Awesome Oscillator -- Default Settings
4. EMA --- Length 50

Buy to Open:-
RSI crosses below 10
ADX must be above 0
Awesome Oscillator must be above 0

Sell to Close:-
Price crosses below 50 EMA




Sell to Open:-
RSI crosses above 90
ADX must be below 0
Awesome Oscillator must be below 0

But to Close:-
Price crosses above 50 EMA


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
No book, only a stair: journaling fills where price move …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #2 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109

I'm not much of a coder but this is pretty easy to do. Have you tried to do it yourself yet?


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109


AddOrder(OrderType.buy_to_open, rsi() crosses below 10 and adx() >0 and AwesomeOscillator() >0 , close[0],1, Color.black, Color.black, "Buy" );

AddOrder(OrderType.sell_to_close, close crosses below SimpleMovingAvg() , open[0], 2, Color.black, Color.black, "Close" );

AddOrder(OrderType.sell_to_open, rsi() crosses above 90 and adx() <0 and AwesomeOscillator() <0 , close[0], 1, Color.red, Color.red, "Sell" );

AddOrder(OrderType.buy_to_close, close crosses above SimpleMovingAvg() , open[0], 2, Color.black, Color.black, "Close" );


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109

^not pulling anything on my end...

you can copy/paste each indie into the strategy then use the same orders I have listed without the () after the indicator name.
that will work for sure. I was trying to make it as simple as possible by using a reference


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
jojowoods83
Baltimore, Maryland
 
Posts: 7 since May 2018
Thanks Given: 6
Thanks Received: 2


Massive l View Post
^not pulling anything on my end...

you can copy/paste each indie into the strategy then use the same orders I have listed without the () after the indicator name.
that will work for sure. I was trying to make it as simple as possible by using a reference



Much Appreciated. I will test when I get home and let you know how it does. I tried coding it myself by pulling a few of the built in strategies and trying to modify but couldn't quite get it to work.


Reply With Quote
  #6 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109


jojowoods83 View Post
Much Appreciated. I will test when I get home and let you know how it does. I tried coding it myself by pulling a few of the built in strategies and trying to modify but couldn't quite get it to work.

If I find some time I will definitely put it together for you.


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
jojowoods83
Baltimore, Maryland
 
Posts: 7 since May 2018
Thanks Given: 6
Thanks Received: 2


Massive l View Post
If I find some time I will definitely put it together for you.


I was able to put it together with what you suggested. At first I thought nothing pulled up but I simply had to change the colours for the arrows as I have a black background. Thank you much for your help!


Reply With Quote
  #8 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109

Happy to hear that!


Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 23, 2018


© 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