B136 Algowizard does not save a second TimeFrame

In AlgoWizard, if I code a second @Parameter ChartData for a second TimeFrame , It will not save the @Parameter ChartData



Please see the attached video :


for example : 


package SQ.Blocks.BarAndTime;

import SQ.Internal.ValueBlock;

import com.strategyquant.lib.*;
import com.strategyquant.datalib.*;
import com.strategyquant.tradinglib.*;

import java.util.Date;

@BuildingBlock(name="(GVEL) BarGlobalValueEntryLong",  display="BarGlobalValueEntryLong(#BaseCurrency#, #QuoteCurrency#)[#Shift#]", returnType = ReturnTypes.Number)
@Help("Global Value of given bar")
@CategoryOrder(400)
@SortOrder(100)
@IgnoreInBuilder
public class BarGlobalValueEntryLong extends ValueBlock 
{
    @Parameter
    public ChartData ChartM15;

    @Parameter
    public ChartData ChartH1;

    @Parameter
    public ChartData ChartH4;

    @Parameter
    public ChartData ChartD1;
    
    @Parameter
    public int Shift;

    @Parameter(minValue=1, maxValue=8, defaultValue="2", step=1)                                                                                                                // BaseCurrency : EUR 2 / QuoteCurrency : USD 1
    public int BaseCurrency;
    
    @Parameter(minValue=1, maxValue=8, defaultValue="1", step=1)
    public int QuoteCurrency;

    @Override
    public double OnBlockEvaluate(int relativeShift) throws TradingException 
    {
        long timeM15;
        long timeH1;
        long timeH4;
        long timeD1;
        
        if(Strategy.isStockpicker()) 
        {
            timeH1 = Strategy.Stockpicker.data.TimeD(relativeShift + Shift);
        }
        else 
        {
            timeH1 = ChartH1.Time(relativeShift+Shift);
        }
        
        Date Date1test = SQTime.toTime(timeH1);

        Date1test.setMinutes(0);
        Date1test.setSeconds(0);

return 0;

    }
}
Attachments
Does not save Timeframe.mp4
(3.81 MiB)
  • Votes +2
  • Project AlgoWizard
  • Type Bug
  • Status Refused
  • Priority Normal

History

E
#1

Emmanuel

03.02.2023 10:10

Task created

E
#2

Emmanuel

03.02.2023 10:11
Voted for this task.
E
#3

Emmanuel

03.02.2023 10:15
Can we set in java a second @Parameter ChartData for a second TimeFrame directly ?
E
#4

Emmanuel

03.02.2023 17:09
in    https://strategyquant.com/sqxapi/com/strategyquant/tradinglib/ChartData.html#getSeries(int)


It seem that we could get a Different Series and different TimeFrame using : 


public DataSeries getSeries(int serieType,int chartTF) ?


I didn't find any code example with this function.


In this case , how can I get the Time of a DataSeries ?


   DataSeries Input = Chart.getSeries(0,0); timeH1 = Input.Time(relativeShift+Shift);


there is no Time() function in the series ?

(https://strategyquant.com/sqxapi/com/strategyquant/datalib/DataSeries.html)


These GetSeries functions are not accessible directly in AlgoWizard

It would be much easier to have multiple ChartData Parameter like :


    @Parameter     public ChartData ChartM15;     @Parameter     public ChartData ChartH1;     @Parameter     public ChartData ChartH4;     @Parameter     public ChartData ChartD1;


These ChartData Parameters would directly be accessible in AlgoWizard in the setting blocks

b
#5

binhsir

05.02.2023 09:39
Voted for this task.
MF
#6

Mark Fric

27.02.2023 11:34

Status changed from New to Refused

I'm sorry, but we don't support multiple ChartData in indicators yet. 


Adding support for it would be quite a lot of work, we have different priorities for now.


Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please