TradingView
etiennec
May 11, 2015 4:47 AM

Tool for Practicing Trading 

Euro Fx/U.S. DollarFXCM

Description

For newbies at trading or people who want to try practice on a new market prior to trading with real money.

Most trader newbies will first work on a practice account to develop their skills. They will also look at historical data to see how they would have fared at that time. If you are like me, both these methods have serious drawbacks.

Practice account
Trading on a practice account is slow as you have to wait for the market to unfold to realize whether your analysis was correct and whether your decisions were right. Many people say that new traders should trade on the daily chart, not the intraday. And this is really slow, of course, as you have to wait for a few days before you can be sure. This is maybe why some new traders start trading intraday, with all risks and bad habits it can generate.

Historical Data
Here, we can work faster since the market has already developped. But the problem is that analysis and decision are biaised because we can see the "future" market moves. If you are like me, analysing and defining trades from past data is much easier then real time ones.

The Script
This is why I have created this script that allows you to hide all market data after a "Now" time that you define. Beyond the "Now", you the screen will be just gray.
By increasing day by day, or hour by hour, you can see the historical market unfold and evolve. It allows to practice trading on the daily chart much faster, analyzing several days and possibly weeks writing a few hours.

Notes:
  • To ensure that the "Future" bars are really invisible, you need to modify the security bar styles to hide the borders. One you hide them, all bars will be fully hidden after the data selected as "Now".
  • Depending on your internet access speed, the loading of new data when you modify the :"Now" parameters may be slow, but it is certainly faster that waiting for the market unfolding day by day !


If you see any way to make this script more efficient, I am welcoming ideas and comments.
Comments
forreal
I like the idea, but does it also cover indicators like RSI, MACD etc? Seems not to.
etiennec
@forreal,
No, it will not hide the indicators, unless you include them in the scipt and crop them like I did for the EMAs:

// Create "Past" indicators for Historical Past Data Series: PastFastEMA, PastSlowEMA, PastLTEMA
PastFastEMA = IsFuture ? na : ema(close,FastEMA)


// Plot "Past" indicators
plot(PastFastEMA, title="Fast EMA", color=#e69138)
etiennec
UPDATE.
Thanks to @worthy7 .

In order to fully hide "future" prices, it is better to also disable "Price Line", "Symbol Last Value" and "Symbol Prev. Close Value" in the chart properties. "Price Line is in the tab "Style" and the two other selections are in the tab "Scales".
worthy7
Thing is, it's gray, so we can actually still see it in the axis. Maybe there is a way to make this work nicely with the new "time warp" tool
etiennec
@worthy7,
Thanks for your comment.
If what you see is the outline of the bar, see my note: "To ensure that the "Future" bars are really invisible, you need to modify the security bar styles to hide the borders. One you hide them, all bars will be fully hidden after the data selected as "Now". "
I just checked and it works.
If not, let me know.
Will check out the time warp tool. Had not use this practice tool for a long time.
worthy7
@etiennec, Sorry you misunderstood me, I mean because of the option "Symbol last value", we need to make sure that is off too otherwise the right side axis highlights the current price shown at the most right point (behind the gray!)
What you could do, is tell users to turn that off, and replace it with the latest price visible in the bars instead!
etiennec
@worthy7,
You are right. The price line needs to be disables in chart properties and the axis. I will add a comment. Thanks
RandomPi
@etiennec,

The wicks are shown even when the bordercolor is hidden..

Is it possible to use plotcandle to change the bordercolor and wickcolor programatically..

I tried it a few times and failed.. prolly due to my programming skills :-(
etiennec
@RandomPi,

The easiest way to solve this problem is to change the colors for both borders and wicks in chart settings:

- border: set transparency to 100%
- wick: set the color to #737375 (you click on +, and you will see a cell to enter the #color code.

This should work. Even though this is a little of a hack
More