Importing Ichimoku for a bot
Importing Ichimoku for a bot
03 Nov 2017, 01:10
Good day
I have been trying to design an algorithm using the built in Ichimoku indicator but have so far been unable to
I have very little programming expirience, and i cant figure out how to import the indicator into the cbot,
i just want to import it, and using its outputs to go long or short a position
basically
long when tenken sen crosses above kujen sen and price above kumo cloud and chikou span > kumo cloud
short when tenken sen crosses below kujen sen above kumo cloud and chikou span < kumo cloud
ignore when price inside cloud
Replies
PanagiotisCharalampous
04 Nov 2017, 09:33
Hi khan_tu,
I cannot see any problem in the process of referencing a custom indicator. Could you please send some more information to reproduce the error e.g. the code of the custom indicator, some screenshots etc?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
06 Nov 2017, 09:07
Hi khan_tu,
Apologies, I just noticed that you needed an in-build indicator. In the case of in-build indicators, you do not need to reference them. You can access them directly from the API. See below a code sample
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 0.0)] public double Price { get; set; } protected override void OnStart() { } protected override void OnTick() { var ichimokuInd = Indicators.IchimokuKinkoHyo(9, 26, 52); } protected override void OnStop() { // Put your deinitialization logic here } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
03 Nov 2017, 09:11
Hi khan_tu,
Thanks for posting in our forum. You can find how to reference a custom indicator in your cBot here. Let me know if this helps you.
Best Regards,
Panagiotis
@PanagiotisCharalampous