NexusFi: Find Your Edge


Home Menu

 





Need help with strategy PriceActionSwingPro


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one johns52 with 2 posts (0 thanks)
    2. looks_two aminkovich69550 with 1 posts (0 thanks)
    3. looks_3 maxuscz with 1 posts (1 thanks)
    4. looks_4 justin217 with 1 posts (0 thanks)
    1. trending_up 3,246 views
    2. thumb_up 1 thanks given
    3. group 6 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 maxuscz 
Brno, Czech republic
 
Experience: Beginner
Platform: NinjaTrader
Trading: Emini ES
Posts: 22 since Dec 2020
Thanks Given: 12
Thanks Received: 6

Hi all.
I make strategy and I can't implement "Sell stop limit order" place in strategy code

I need put stop limit order only when current price go down and cross blue line - it s price counted from red line.



I know red line price it is PriceActionSwingPro1.entryLevels[0]
and can count all other points from this line

My variant dosnt work - Price go up above blue line but order placed and filled immidiatly when price jut go up. Fille dwithout my rules. And I dont see my mistake.

 
Code
if ((PriceActionSwingPro1.Entries[0] < 0) //My signal if we go down
&& Close[0] >= (PriceActionSwingPro1.entryLevels[0] + ( 5 * TickSize)) // If current price more or equal redline price + 5 ticks
&& ((BarsSinceExitExecution(0, "", 0) == -1) || (BarsSinceExitExecution(0, "", 0) >0)))
				
{
   EnterShortStopLimit(Convert.ToInt32(DefaultQuantity), PriceActionSwingPro1.entryLevels[0] + ( 3 * TickSize),PriceActionSwingPro1.entryLevels[0] + ( 4 * TickSize), @"SignalDN");			
				
   }

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Need help updating setting in RSqueeze indicator for Nin …
Platforms and Indicators
pay to get sponsored for series7
Stocks and ETFs
TOS inspired trading simulator
ThinkOrSwim
Need help Heiken Ashi system
NinjaTrader
How to distinguish between trending and mean reversion
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
The Program
9 thanks
Ask Me Anything (AMA) with NinjaTrader Client Services
2 thanks
Has anyone ever built any type of simple twitter scraper …
2 thanks
Gradient Divergence Trading
1 thanks
Daytrading ES & NQ
1 thanks
  #2 (permalink)
 justin217 
Dunlap Illinois
 
Experience: Intermediate
Platform: NinjaTrader
Trading: YM
Posts: 28 since Mar 2017
Thanks Given: 38
Thanks Received: 12

I am attempting to use the PAS indicator to code my own strategy but I am running into some issues/questions.

1) I'm working on the buy side now and I have successfully got the strat to enter a BuyStopMarket order after the HL prints but my issue is since the indi repaints, I am getting a lot of stop outs even with a offset Buy Stop order due to the nature of the repaint. Is there a way around this, or is there an exposed variable I can call on for my strat that will only look at the "final" paint value?

2) Also, around those same lines I want my strat to read in the volume values for each swing and based on a criteria...it will either take the buy or pass on the buy based on some simple if/then logic. Essentially a filter if you will, to filter out not so great trades. I have yet to find a variable in his PAS code that will expose the volume info that I can use in my code. Is this possible? And if so, how can I also use it to avoid repainted volume data?

3) Thirdly, has anyone tried using this PAS indicator on Blackbird and done these more advanced strategies successfully? I'm toying the idea of giving Blackbird a free trial/demo to code this strategy for me and instead of me doing it by code alone but don't want to waste time if its not going to work.

In case you were curious...here is my SUPER BASIC buy logic I am working with right now......

 
Code
// Buy Logic
			if ((Position.MarketPosition == MarketPosition.Flat)
				&& (PriceActionSwing1.HigherLow[0] != 0)
				&& (Close[0] > PriceActionSwing1.HigherLow[0]))
			{
				EnterLongStopMarket(Close[0] + 1 * TickSize, "long");
TIA for any and all suggestions and help!

Justin

Reply With Quote
  #3 (permalink)
 johns52 
Michigan, USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: futures
Posts: 18 since Jul 2014
Thanks Given: 17
Thanks Received: 6



Quoting 
// Buy Logic
if ((Position.MarketPosition == MarketPosition.Flat)
&& (PriceActionSwing1.HigherLow[0] != 0)
&& (Close[0] > PriceActionSwing1.HigherLow[0]))
{
EnterLongStopMarket(Close[0] + 1 * TickSize, "long");

I tried this code in the NT8 Strategy Builder and it won't compile.

Is there any way to code this? Usually PriceActionSwing1.HigherLow[0] != 0 or PriceActionSwing1.HigherLow[0] > 0 or PriceActionSwing1.HigherLow[0] == true works.

I can't get a signal from the PriceActionSwingOscillator either.

TIA for any help.

Reply With Quote
  #4 (permalink)
 johns52 
Michigan, USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: futures
Posts: 18 since Jul 2014
Thanks Given: 17
Thanks Received: 6

I figured it out. You have to take autotrader8's code and paste it into the NinjaScript Editor - that compiles.

https://nexusfi.com/attachments/291969d1585499718

Here's the NexusFi page link:

Reply With Quote
  #5 (permalink)
conantrades
Rostock Germany
 
Posts: 6 since Jun 2022
Thanks Given: 1
Thanks Received: 5

Hi,

I already heared about the PAS Indicator and that it's open source. Can please someone tell me where to find the indicator? I wan't to try it

Happy trading everyone

Reply With Quote
  #6 (permalink)
 aminkovich69550 
Campbell, CA, USA
 
Experience: Master
Platform: NinjaTrader,TOS
Broker: NinjaTrader, TDameritrade
Trading: Emini ES, CL
Posts: 2 since Jun 2016
Thanks Given: 1
Thanks Received: 0

I just finished testing the PriceActionSwingPro indicator.
Nicely done. I'm trading Supply / Demand and Volume Profile.
Adding this indicator helps track market structure. The trick is in defining strength.
Thank you for sharing your code.
Alex
aomtrading.com

Reply With Quote




Last Updated on September 8, 2022


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