NexusFi: Find Your Edge


Home Menu

 





Up closes counter


Discussion in MultiCharts

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




 
Search this Thread
  #1 (permalink)
 
Small Dog's Avatar
 Small Dog 
Sydney NSW Australia
 
Experience: Intermediate
Platform: TradeStation, Oanda
Trading: Forex, index futures
Frequency: Daily
Duration: Days
Posts: 177 since Jun 2020
Thanks Given: 18
Thanks Received: 166

In case it could be of interest to anyone, I wrote a short code for the indicator that counts the number of up closes in the defined period and expresses them as a ratio. So If the price closed up 6 times out of 10 it will be expressed as 0.6. On top of that the indicator plots the average of this value of the same length. The code is bare, so no colors or styles pre-defined.


{Counts the number of bars within the specified length where close > open}

Inputs: Length(9);

Vars: UpBars(0),
Count (0),
UpBarCount(0),
CCBars(0),
CCCount(0);


UpBars = 0;
CCBars = 0;

For count = 0 to Length-1 begin
If close[count] > open[count] then UpBars = UpBars + 1;
End;

UpBarCount = UpBars/Length;
CCCount = CCBars/Length;

Plot1 (UpBarCount, "BarCount" );
Plot2 (0.5, "Breakeven");
Plot3 (Average(UpBarCount, Length), "Avg");


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT8 coding values of "Additional Data"
NinjaTrader
Requesting replay data for...
NinjaTrader
Dark Pools Surpass 50% of stock trading volume
Stocks and ETFs
Tech-Savvy Trader Seeking Collaboration with Trading Pla …
Emini and Emicro Index
Assigning value to swing high and low points: 2, 1, -1, -2
Traders Hideout
 
  #2 (permalink)
 
FuManChou's Avatar
 FuManChou 
Saint Paul, Minnesota, United States
 
Experience: Intermediate
Platform: MultiCharts
Broker: Edge Clear LLC
Trading: MNQ
Frequency: Many times daily
Duration: Hours
Posts: 109 since Jun 2019
Thanks Given: 1,139
Thanks Received: 122

Thanks for sharing.


Reply With Quote




Last Updated on July 21, 2021


© 2025 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