Topics
Replies
belasto
02 Sep 2021, 19:51
RE:
Thanks for the answer. It makes sense this way. However, maybe you can help me with a workaround? Not such a big deal I assume, but I am not sure how to get there.
I am creating one initial Position and 4 PendingOrders afterwards, some kind of grid trading approach. I'd like to give the PendingOrders the same TP as the initial Position. I could add listener on PendingOrder filled and immediately adjust the TP, but is there an easy way to adjust it in advance?
@belasto
belasto
28 Apr 2021, 12:51
( Updated at: 21 Dec 2023, 09:22 )
RE:
In the indicators Calculate function - working:
Chart.DrawIcon("arrow", ChartIconType.DownArrow, index, Bars[index].High + 5 * Symbol.PipSize, Color.Red);
In the cBot onBar function - not working, I let it run in backtesting, so onBar() is being called:
Chart.DrawIcon("arrow", ChartIconType.DownArrow, Bars.Count - 1, Bars[Bars.Count-1].High + 5 * Symbol.PipSize, Color.Red);
Thanks so much for helping out.
!!!! EDIT: If found the problem. I was not using the "visual mode" in backtesting... no wonder! Now it's working. Thanks!
@belasto
belasto
30 Aug 2022, 01:42 ( Updated at: 30 Aug 2022, 01:44 )
RE:
Hi Panagiotis,
Okay - with your input, I finally got it to work.
If some other Super Newbie like me has the same question, here is a super noob recap.
Indicator Code
cBot Code
(Don't forget to click on "Manage References" on the top and include your custom indicator!)
Best regards.
@belasto