Replies

GunArm
15 Apr 2015, 23:14

Or for that matter, to sync custom indicators I have created to other workstations?


@GunArm

GunArm
15 Apr 2015, 23:00

Sorry, I had not found the DrawHorizantalLine method.  It is working for me.  I still wonder why the DrawLine wasn't also working...


@GunArm

GunArm
15 Apr 2015, 22:40

Is the right way to do this to use OnBar() instead of OnTick(), and then use Result.Last(1) and Result.Last(2) ignoring Result.Last(0)?


@GunArm

GunArm
15 Apr 2015, 22:38

RE:

I found there is an OnBar() method you can override, rather than using OnTick().

Since technically your question started with "if I am using OnTick", if OnTick is a requirement, you could probably set some kind of flag in the OnBar method, and then skip a section of your OnTick method until that flag is set.  Otherwise easier to just use OnBar in it's place.


@GunArm

GunArm
15 Apr 2015, 22:11

RE:

I also want to know this, something like

protected override void OnTick()
{
   if( ! FIRST_TICK_OF_NEW_BAR) return;

   // do the stuff you only want to do once on previous candle close here
}

    

 

I also opened a related thread /forum/cbot-support/4932


@GunArm

GunArm
15 Apr 2015, 22:04

RE: RE:

You can't calculate it in degrees, because of the variable scale, but you could certainly calculate it in price/time.  I would imagine it would depend on how you are getting your "trend".  Basically you would take two points with price and time of each and:

(Price[new] - Price[old])/(Time[new] - Time[old])

Depending on where your "trend" data comes from, you might have to do something more fancy, like a linear regression.

cjdduarte said:

Copied from another forum: ". You can not calculate an angle because the chart does not have a fixed scale Change the vertical or horizontal scale and the angle changes"

Someone with a different opinion?

 

Forex19 said:

Hi, 
I wanted to ask if there is an indicator measuring the slope of a trend or if it's somehow possible.

 

 


@GunArm

GunArm
15 Apr 2015, 21:38

It's built in, in the "StochasticOscillator" class.  If you wanted to modify the code, you would probably need to re-implement it.


@GunArm

GunArm
27 Mar 2015, 23:59

Agree. I am used to TradingView, and lacking the ability to turn off AutoScale really bothers me.


@GunArm

GunArm
27 Mar 2015, 23:58

Having a chat definatly helps with boredom. Although it can also be a distraction filled with trolls. I haven't figured out if the chat in TradingView makes me a better or worse trader.

Anyway if this gets implemented, I would like to see it powered by IRC. Old as the internet, time tested, tried and true.


@GunArm

GunArm
27 Mar 2015, 23:52

I am very new to cTrader, but spread *IS* shown on the chart. Red and blue lines around the price... Maybe this is new?


@GunArm

GunArm
27 Mar 2015, 23:51

I agree with this. I think I like the "only dragging objects by holding down a control key" alternative the best. Another thing that would be extremely helpful (kind of wierd that it's missing in my opinion) is having an undo buffer


@GunArm

GunArm
27 Mar 2015, 23:33 ( Updated at: 27 Mar 2015, 23:41 )

This isn't the trendlines fault.

When you anchor a line to a wick on a daily candle, the tip of that wick represents a 24 hour period. When you drill down to an hourly chart, you now have 24 candles where that one wick was. How can it know with hourly precision where to anchor a line which you placed with only Daily precision?

It can put it somwhere in the middle of the day... Or it could look for the hourly candle that made the daily high wick and anchor to that automatically, but then what if you went to a 15 minute chart? It could, whenever you anchor a line to a wick on a chart higher than 1minute, try to find the lowest timeframe information (tick) which set the wick of the higher timeframe, but what if there are many ticks that touched that exact level? There is no answer to how to handle this automatically.

It is impossible for the charting software to add precision which wasn't there when you anchored the line on a higher timeframe. It is not because the trendline is "unreliable"


@GunArm

GunArm
27 Mar 2015, 22:59

I understand this can be done with an indicator (here is one /algos/indicators/show/203) however I feel that this is such an important part of a trading platform, it should be built in.

It would be nice if it was integrated into the drawing tools where you could right click any arbitrary line (trend or level) and add an alert. Check out how well it is implemented on TradingView charts.


@GunArm