NexusFi: Find Your Edge


Home Menu

 





Code Strategy With Criteria to be met


Discussion in ThinkOrSwim

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




 
Search this Thread

Code Strategy With Criteria to be met

  #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?
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
Option : Call and Put increase at same time ?
The Elite Circle
 
  #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,106

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,106


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,106

^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,106


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,106

Happy to hear that!

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 23, 2018


© 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