NexusFi: Find Your Edge


Home Menu

 





how to avoid these type of trades in algo


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 Ssjaznguy 
la puente, California
 
Experience: None
Platform: NinjaTrader
Trading: Es
Posts: 30 since Oct 2018
Thanks Given: 7
Thanks Received: 1

Hi,

need suggestion on how to program in a condition so that I can avoid these type of trades in algo (attached image). I do not want my algo to go long because the prior 3+ bars are close to swing top and also in congestion.

I have use these indicator to try to filter out as much as I can:

adx
choppiness index
swing
dynamic sr bands


What I think is that I have to do bar[0], bar[1], bar[2] (some math) = congestion true...

am I on the right though process and if someone is willing to supply sample code for me to test.

or should I go with a RSI type to limit trades when it could be overbought/sold?


Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	200
Size:	15.3 KB
ID:	320183   Click image for larger version

Name:	Capture.PNG
Views:	206
Size:	53.3 KB
ID:	320184  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
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
  #2 (permalink)
 Tiang 
Singapore
 
Experience: Beginner
Platform: IB, TOS, NinjaTrader, MT5
Trading: Stocks,ES, FX
Posts: 8 since Nov 2012
Thanks Given: 4
Thanks Received: 4

You r right on the congestion. Something like this could work:
if (range of last x bars < certain points) ==> congestion.


Reply With Quote




Last Updated on December 12, 2021


© 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