Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

custom colored candle
 Post subject: custom colored candle Post rating: 0   New post Posted: Wed 14 Jun, 2017, 14:52 

User rating: 1
Joined: Wed 19 Feb, 2014, 10:42
Posts: 16
Location: NetherlandsNetherlands
Hello all,

Is it possible in code to assign a color for a specific candle?
Say that based upon whether the last closed bar had for example a higher high then the previous one i want
the last closed bar to turn blue, but only the candle not the border.
Vice versa for a lower low, it needs to assign a red color or so.

All other candles/bodies need to be transparant if possible.

Anyone got an idea how to approach this situation? Im sure its been done before.

Phil


 
 Post subject: Re: custom colored candle Post rating: 0   New post Posted: Fri 14 Jul, 2017, 07:16 

User rating: 1
Joined: Wed 19 Feb, 2014, 10:42
Posts: 16
Location: NetherlandsNetherlands
Any chance anybody has some pointers on how to achive this?
I saw that demo version 3.2.13 stops supporting compiled MQL indicators.

I used to have this feature available in MT4 and converted it to JForex which showed it nicely
but now i need to come up with a JForex solution.

Is there any code sample available how to assign colors to the candle bodies based upon some code logic?

Anyone?


 
 Post subject: Re: custom colored candle Post rating: 0   New post Posted: Fri 21 Jul, 2017, 11:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Here is an example of how to draw custom candles on chart.
https://www.dukascopy.com/swiss/english ... tor#p86793


 
 Post subject: Re: custom colored candle Post rating: 0   New post Posted: Fri 21 Jul, 2017, 13:57 

User rating: 1
Joined: Wed 19 Feb, 2014, 10:42
Posts: 16
Location: NetherlandsNetherlands
Thanks,

I managed to get it to work by using the Heiken Ashi indicator code.


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com