Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now, It is Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
This is a quick port of the point and figure indicator from easy language to ToS. This was done as a request. I'm not an expert on P&F charts and I don't use them.
I think I got it to match the EL code. I will have to compare it to the TS version later when I have a minute, but anyone can take a stab at improving it.
Regards,
-C
“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Can you help answer these questions from other members on NexusFi?
It appears that the translation only plots the upper and lower limits. I've been think that it might be possible to improvise with the plotting of Xs and Os by using the addChartBubble command, because its syntax is addChartBubble(x-axis location,y-axis location, text, color,up).
If it were possible to identify the x & y coordinates to place the bubbles then a PnF chart in TOS might be possible. The X-Axis consists of either bars or time; whereas the Y-Axis consists of prices. The horizontal limit is the aggregated time period and the vertical limit is the highesthigh and lowestlow prices. I'm working on it. If you have any suggestions, please let me know. The bubbles could be like this:
I've developed some starter code for a Point & Figure indicator (PnF), but I need some help. The code shows the closing prices of each bar on the chart and an index number for each bar.
1. How can I start a calculation from the far left of the chart to progressively calculate the PnF value; since normally TOS counts from the right side of the chart?
2. Is there a way to total the bar count and use the bar index to use the fold command to do the iterations?
3. This code displays the number of each bar; but how can I use that number in the bar index (i.e. close[#])?
The following user says Thank You to StockJock for this post:
This code is to start the bar count from the first bar on the far left side of the chart and count down forward in time. I'm trying to use the fold statement to do a count down, but fold is so different from loops in other programming languages. I need help on this. Has anyone else used the fold statement?
=================================================
declare upper;
# Clear Chart
AssignPriceColor(CreateColor(10, 0, 78));
AssignBackgroundColor(CreateColor(10, 0, 78));
# Graph Boundaries
plot HH = HighestAll(high);
plot LL = LowestAll(low);
plot ML = (HH + LL) / 2;
# Plot Bubbles
def TotalBarsOnChart=24*60*60 *1000/getAggregationPeriod();
def Bar_Xaxis = barNumber();
def Bar_Yaxis = ML;
rec FBarIndex = if IsNaN(FBarIndex[1] ) then 0 else FBarIndex[1] + 1;
rec RBarIndex=fold index = 1 to TotalBarsOnChart with Bar = TotalBarsOnChart do Bar = Bar - 1);
I don't seem to have much luck developing a PnF indicator in ThinkScript, but I've found out that the Three Line Break chart does something similar. If its not too much trouble, could someone translate this EasyLanguage code into ThinkScript?
What elof and I are trying to do is to develop code for a PnF chart for the ThinkOrSwim trading platform. The screenshot that you're referring to is in this thread in post #4 and it does work; so I don't know why elof is having a problem with it. It is only a starter code to attempt to build a PnF code. It is not a finished PnF code.
I see that your Trading Experience is Advanced and if your ThinkScript programming experienced is advanced also, I would appreciate your help. I've come across a very good working code that is coded for the Amibroker platform and if this could be translated into a working TOS code, we would greatly appreciate it. I've attached the Amibroker PnF chart code as a text file together with a screen shot showing its capability.
On issue with PnF chart code is that it should be able to display Xs and Os in the same column for the Wyckoff trading system only when the settings are a box size of 1 and a reversal size of 1. For all other settings, the Xs and Os should be in seperate columns. The attached code doesn't do that and I'm still looking for code that will do it so that it could be translated into TOS. Your help with this is appreciated.
I've also attached the Amibroker User's Guide that contains instructions for the Amibroker Formula Language (AFL).
The following user says Thank You to StockJock for this post:
So, I take it that nobody was ever able to figure this out for ThinkOrSwim.
I am just starting with ToS and really miss this wonderful charting technique.