How to write a preamble for a custom signal in MultiCharts
3件の返信
I’ve created a custom signal which uses data from several days ago in its logic. I successfully managed to make it work in SQ and now I’m having troubles generating code for it in MultiCharts.
In MC, this translates into a function call which doesn’t have access to chart data, meaning that I would need to provide it as a function argument. Specifically, the function in MC accepts an array of numbers, and in order to provide it to the function, I would need to generate it somewhere in the strategy code.
Hence I’m facing the issue that I do not know where to place this code. It doesn’t fit into the template, because that would mean it’s generated each time the strategy uses the indicator.
I guess I’m probably missing something obvious here, so I’d appreciate any help.
0
Here are more details to clarify what I’m trying to do, which, after some additional research, I managed to formulate better.
I identified that I am probably looking to write a custom trading option, although I’m still no 100% sure.
Here’s what I’m trying to do, I want to create some sort of extension which allows the generated strategy code to:
- accept additional inputs
- create and populate additional variables
- create an array variable type (for MC/TS, which uses the keyword array:)
- execute custom code in the body of the strategy, which populates the array by invoking a custom function
I can’t seem to find another way to do it, and although the code editor doesn’t allow me to create a new Trading Option, I can create one by modifying a new file created, e.g., for an indicator, but then I face another problem, that SQ cannot find (although I created them) the templates for the trading option. I created both the _code.tpl and _variables.tpl for my trading option, but they are not picked up by SQ.
0
こんにちは,
I suggest to check page where we provide coding help https://strategyquant.com/codebase/request-coding/. You can contact my colleague using the mail stated on that page. He should be able to help you with the code you try to setup
0
Hello, I suggest to check page where we provide coding help https://strategyquant.com/codebase/request-coding/. You can contact my colleague using the mail stated on that page. He should be able to help you with the code you try to setup
Thanks Tomas but I don’t need to request coding, I would like documentation or some guidance about how to code it myself. I’ve browsed all the documentation about this topic, and there’s no documentation about how to do this, or at least I couldn’t find it.
Can you give me some pointers please?
0
3件の返信を表示中 - 1 - 3件目 (全3件中)