NexusFi: Find Your Edge


Home Menu

 





Metastock Pivot Lines for Ninjatrader


Discussion in NinjaTrader

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




 
Search this Thread

Metastock Pivot Lines for Ninjatrader

  #1 (permalink)
 
peakskill's Avatar
 peakskill 
west greenwich, ri, usa
 
Experience: Intermediate
Platform: NinjaTrader
Broker: PFG Best
Trading: gbp/usd
Posts: 31 since Oct 2010
Thanks Given: 52
Thanks Received: 12

I have an indicator that I use in Metastock ProFX to draw rolling pivot lines during a 4 hour period, based on High, Low, Close of previous 4 hour period.

I use these for forex trading only. The time periods are 0100-0500, 0500-0900, 0900-1300, 1300-1700, 1700-2100, and 2100-0100, all times EST.

For example, at 0500 EST, pivot lines, including the central pivot (blue line) as well as two support and two resistance pivots (solid red lines), and mid-points in between each support and resistance line (dashed red lines) are automatically drawn based on the High, Low and closing price from 0100-0500. See attached image.

Here is the metastock code:

new:= Mod(Hour()-1,4)=0 AND Minute()=0;
yh:=ValueWhen(1,new, Ref(HighestSince(1,new,H),-1));
yl:=ValueWhen(1,new, Ref(LowestSince(1,new,L),-1));
yc:=ValueWhen(1,new, Ref(C,-1));
pp:=(yc+yh+yl)/3;
r1:=(pp*2)-yl;
r1m:=r1-((r1-pp)/2);
s1:=(pp*2)-yh;
s1m:=pp-((pp-s1)/2);
r2:=pp+r1-s1;
r2m:=r2-((r2-r1)/2);
s2:= pp-r1+s1;
s2m:=s1-((s1-s2)/2);
r2;
r2m;
r1;
r1m;
pp;
s1m;
s1;
s2m;
s2

Typically I plot these 4 hour pivot lines on a 3 minute GBPUSD chart. I look for short signals below the central blue pivot line and long signals above, using either the support or resistance lines for profit targets, depending upon whether I am short or long. Often, these targets work out rather well for FOREX trading.

I do not know how to program in Ninjatrader. Can anyone help?

Thanks!

Attached Thumbnails
Click image for larger version

Name:	metastock_4hr_Pivots.jpg
Views:	373
Size:	304.0 KB
ID:	25947  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
31 thanks
Just another trading journal: PA, Wyckoff & Trends
20 thanks
My NQ Trading Journal
19 thanks
Tao te Trade: way of the WLD
14 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Have coded a rolling pivots indicator today. It is a first version so it still needs some adjustments.

- It currently does not have midpivots, but that is easy to add.

- This version aligns itself to the sessions selected via session manager, but I will add an option that the indicator aligns itself to the daybreak only, so that the 4-hour-period will not be interrupted by the start of an intraday session.

- I could also add different versions of pivots, such as wide pivots, Camarilla pivots or Fibonacci pivots.

The chart below shows the time periods that you requested. It uses one session starting at 5:00 PM Est and displays the 4-hourly-pivots for the 6 intraday periods that follow.

Attached Thumbnails
Click image for larger version

Name:	$GBPUSD (3 Min)  09_12_2010.jpg
Views:	311
Size:	95.1 KB
ID:	26762  
Attached Files
Elite Membership required to download: PivotsHourly.zip
Reply With Quote
Thanked by:
  #4 (permalink)
 
peakskill's Avatar
 peakskill 
west greenwich, ri, usa
 
Experience: Intermediate
Platform: NinjaTrader
Broker: PFG Best
Trading: gbp/usd
Posts: 31 since Oct 2010
Thanks Given: 52
Thanks Received: 12

Thank you for the rolling pivots. They work rather well and I will be sure to use them in my strategy.

Best trading to you and thanks again.

~Jim

Started this thread Reply With Quote




Last Updated on February 6, 2011


© 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