Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 17:12:50 +0000



Post From: Replacing sc.Subgraph by sc.Subgraph.Array

[2017-06-26 20:45:50]
rhovega - Posts: 279
I ran out of subgraphs on a trading system, and thought to replace some sc.Subgraph by sc.Subgraph.Array to increase the number of available Subgraphs. I can't get it to work.

For example I changed the following:

    SCSubgraphRef ED_TSISub = sc.Subgraph[42];
   sc.Ergodic(sc.BaseData[SC_LAST],ED_TSISub, 30, 10, 1);  

To:

    SCSubgraphRef ED_IndicsSub = sc.Subgraph[42];
    sc.Ergodic(sc.BaseData[SC_LAST],ED_IndicsSub.Arrays[0], 30, 10, 1);  

I get error "error C2664: 'SCFloatArrayRef s_sc::Ergodic(SCFloatArrayRef,SCSubgraphRef,int,int,float)': cannot convert argument 2 from 'SCFloatArray' to 'SCSubgraphRef'"

Can it be that studies with multiple outputs (e.g. RSI, MACD, TSI ... most of them) must have a Subgraph as main output, and that is the reason for the error?
Date Time Of Last Edit: 2017-06-26 20:51:46