NexusFi: Find Your Edge


Home Menu

 





EasyLanguage Price Action PaintBar Study


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 2 posts (4 thanks)
    2. looks_two aslan with 2 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Bacon with 1 posts (3 thanks)
    1. trending_up 7,238 views
    2. thumb_up 8 thanks given
    3. group 6 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

EasyLanguage Price Action PaintBar Study

(login for full post details)
  #1 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350

I thought I would start working on a basic Price Action indicator for MultiCharts.

Here is a quick version I have so far. It colors HH + HL, LH + LL, and Bearish/Bullish Engulfing.

Please make enhancements...

 
Code
                            
// Big Mike Trading https://nexusfi.com

// 17 April 2010

vars:
    
color(GetPlotColor(5));
    
color GetPlotColor(5);

if 
H[1] and L[1then color GetPlotColor(6);
if 
H[1] and L[1then color GetPlotColor(7);
if 
<= H[1] and >= L[1then color GetPlotColor(8);

if 
H[1] and L[1] and C[1then color GetPlotColor(9);
if 
H[1] and L[1] and C[1then color GetPlotColor(10);

PlotPaintBar(HLOC"PriceAction"color);



Plot5(C"Neutral");
Plot6(C"HH+HL");
Plot7(C"LH+LL");
Plot8(C"IB");
Plot9(C"BullEng");
Plot10(C"BearEng");

NoPlot(5);
NoPlot(6);
NoPlot(7);
NoPlot(8);
NoPlot(9);
NoPlot(10); 
[img]https://nexusfi.com/v/9t39k3.png[/img]

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following 4 users say Thank You to Big Mike for this post:

Can you help answer these questions
from other members on NexusFi?
Volume profile TradeStation
EasyLanguage Programming
ISO Equity Curve Indicator
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
37 thanks
GFIs1 1 DAX trade per day journal
28 thanks
Deaddogs Stock Trading
27 thanks
Supertradersams Thread Journal on NQ/MNQ
24 thanks
Leaving CFD trading and learning futures
13 thanks

(login for full post details)
  #3 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 623 since Jan 2010
Thanks Given: 351
Thanks Received: 1,123


One little tweak: put the plots in a block that does not execute, then you don't need the noplots, and none of the statements ever execute, but you still get the plots in the configuration. Using CurrentBar = 0 is sneaky, but works.

 
Code
if CurrentBar = 0 then begin
    // only here to set colors in the config
    Plot5(C, "Neutral"); 
    Plot6(C, "HH+HL"); 
    Plot7(C, "LH+LL"); 
    Plot8(C, "IB"); 
    Plot9(C, "BullEng"); 
    Plot10(C, "BearEng"); 
end;

Reply With Quote
The following user says Thank You to aslan for this post:
(login for full post details)
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350


aslan View Post
One little tweak: put the plots in a block that does not execute, then you don't need the noplots, and none of the statements ever execute, but you still get the plots in the configuration. Using CurrentBar = 0 is sneaky, but works.

 
Code
if CurrentBar = 0 then begin
    // only here to set colors in the config
    Plot5(C, "Neutral"); 
    Plot6(C, "HH+HL"); 
    Plot7(C, "LH+LL"); 
    Plot8(C, "IB"); 
    Plot9(C, "BullEng"); 
    Plot10(C, "BearEng"); 
end;

Good idea. Can also prefix it with once I believe.

Thx,
Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
 
aslan's Avatar
 aslan 
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
Posts: 623 since Jan 2010
Thanks Given: 351
Thanks Received: 1,123

Yes, once would work, except then you need the noplots since the plots will execute once.

Reply With Quote
(login for full post details)
  #6 (permalink)
 
Bacon's Avatar
 Bacon 
3rd Rock
 
Experience: Intermediate
Platform: Other
Posts: 204 since Mar 2010
Thanks Given: 273
Thanks Received: 1,391

@Mike,

Good idea for an indicator.

Not sure what level of detail you're aiming for, but here are a few ideas....

 
Code
if O = C then color = GetPlotColor(11);
if H[3] < H[2] and L[3] < L[2] and H[1] < H[2] and L[1] < L[2] and C < C[1] then color = GetPlotColor(12);
if H[3] > H[2] and L[3] > L[2] and H[1] > H[2] and L[1] > L[2] and C > C[1] then color = GetPlotColor(13);
if H[1] <= H[2] and L[1] >= L[2] and C > H[2] then color = GetPlotColor(14);
if H[1] <= H[2] and L[1] >= L[2] and C < L[2] then color = GetPlotColor(15);
 
Plot11(C, "Doji");
Plot12(C, "RevShort");
Plot13(C, "RevLong");
Plot14(C, "IB-BreakLong");
Plot15(C, "IB-BreakShort");
Plots 12 thru 15 assume trade-plans that require the signal bar to close before becoming a valid trigger (painted).

These do not allow for trade-plans that only require the trigger be broken at anytime during the formation of the current bar. Will the code allow the painting of the current bar, based on breaking a trigger point, prior to the bar closing?

Something similar could be done for the break of the low of a Bearish Engulfing or of the high of a Bullish Engulfing.

If you aren't interested in painting trigger bars, then for the reversal pattern you could just paint the third bar of the three bar pattern....

 
Code
if H[2] < H[1] and L[2] < L[1] and H < H[1] and L < L[1] then color = GetPlotColor(12);
if H[2] > H[1] and L[2] > L[1] and H > H[1] and L > L[1] then color = GetPlotColor(13);
Just random thoughts...

Bacon

Reply With Quote
The following 3 users say Thank You to Bacon for this post:





Last Updated on April 18, 2010


© 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