Heiken Ashi Candles

Created at 12 Apr 2024, 07:53
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
GB

gbg561

Joined 05.04.2024

Heiken Ashi Candles
12 Apr 2024, 07:53


Good morning 

How can I get Heiken Ashi candles to work in a bot.

I get the following error : CS0246

Any advice greatly appreciated.

Thanks

Gary


@gbg561
Replies

firemyst
14 Apr 2024, 10:14

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.


@firemyst

gbg561
16 Apr 2024, 07:29

RE: Heiken Ashi Candles

firemyst said: 

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.

Hi firemyst,

Thanks for your reply.

I am new to this, how would I import tem into my project?

Many thanks

Gary


@gbg561

PanagiotisCharalampous
16 Apr 2024, 08:16

RE: RE: Heiken Ashi Candles

gbg561 said: 

firemyst said: 

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.

Hi firemyst,

Thanks for your reply.

I am new to this, how would I import tem into my project?

Many thanks

Gary

Why do you need to use the custom indicator and not use the built in heikin ashi candles instead?


@PanagiotisCharalampous

firemyst
16 Apr 2024, 08:36 ( Updated at: 17 Apr 2024, 05:42 )

RE: RE: RE: Heiken Ashi Candles

PanagiotisCharalampous said: 

gbg561 said: 

firemyst said: 

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.

Hi firemyst,

Thanks for your reply.

I am new to this, how would I import tem into my project?

Many thanks

Gary

Why do you need to use the custom indicator and not use the built in heikin ashi candles instead?

Maybe because they want to see the HA candles on a regular candle chart? I sometimes do the same thing.

There's also numerous indicators that do this as well as are quite popular.

For example:

https://www.tradingview.com/script/pjl3mIvc-Smoothed-Heiken-Ashi/

https://stonehillforex.com/2023/03/heiken-ashi-smoothed-as-a-confirmation-indicator/

 

 

 


@firemyst

gbg561
16 Apr 2024, 13:20

RE: RE: RE: Heiken Ashi Candles

PanagiotisCharalampous said: 

gbg561 said: 

firemyst said: 

Because that appears to be a custom indicator you are using… if you know how, you need to import them into your project or add them as a reference in Visual Studio.

Hi firemyst,

Thanks for your reply.

I am new to this, how would I import tem into my project?

Many thanks

Gary

Why do you need to use the custom indicator and not use the built in heikin ashi candles instead?

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 


@gbg561

firemyst
16 Apr 2024, 15:27 ( Updated at: 17 Apr 2024, 05:42 )

RE: RE: RE: RE: Heiken Ashi Candles

gbg561 said: 

 

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 


@firemyst

gbg561
17 Apr 2024, 06:52

RE: RE: RE: RE: RE: Heiken Ashi Candles

firemyst said: 

gbg561 said: 

 

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 

Thanks, but how do I get that into the code? 


@gbg561

firemyst
17 Apr 2024, 08:56 ( Updated at: 17 Apr 2024, 08:58 )

RE: RE: RE: RE: RE: RE: Heiken Ashi Candles

gbg561 said: 

firemyst said: 

gbg561 said: 

 

Hi, I thought there were only custom Heiken Ashi candles? where would I find the built in heiken ashi candles? Thanks

 

Thanks, but how do I get that into the code? 

 

Bars haTimeFrame = Bars.GetBars(TimeFrame.HeikinHour2);

//Now the time data is stored in the haTimeFrame variable. Put this in your “OnStart” or “Initialize” methods depending on whether you're writing a bot or indicator so it only gets the data once. If you put it in OnTick or Calculate, it's going to waste valuable CPU and network bandwith trying to reload the data on each tick.

 


@firemyst