Error: Unknown Command. Code is invalid. Please correct it line 8:

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #216040 quote
    Pieter_T
    Participant
    New

    Good point Peter. Yes, that was my first thought as well. In the indicator, the parameter is definitely set up as “Decimal”. If I use the indicator on the chart directly and use decimal values it works correctly. The backtesting also works fine using decimal values. It is just when you select the prepare for auto-trading that for some reason it does not want to accept the decimal values. Did you have this issue before? The workaround I use now is to use whole numbers in the parameter setting and then divide the whole numbers in the code to get the decimal places I need. That works fine but it is still an annoyance.

    #216045 quote
    PeterSt
    Participant
    Master

    The workaround I use now is to use whole numbers in the parameter setting and then divide the whole numbers in the code to get the decimal places I need.

    Haha, yes, I saw you doing that. This is why/how I came to the question.
    But no, I don’t recognize that and using decimals via the normal Optimization Parameters I am doing all the time (and they work out).
    I also recognise the /10000 which I use myself regularly, but this is because the numbers in the Optimization Parameters can’t get small enough. From the top of my head : 4 is the maximum while more normal would be 5 (which is the max for Rounding) and beyond of course. What I mean with this is :

    When you iterate from 0.00001 to 0.00010, this all shows the same in the Result List. Still internally it *will* use that 5th decimal but as you can’t see it, it is useless.
    Can’t this be your problem ?
    It is even hard to recognise for me because when such a thing happens, I start to obtain the iteration as 1-10 and divide by 10000 … I do this regardless. And with Forex this is a nobrainer. In the 1st attachment you can see that the decimals are used all over the place, but these are the Optimization Parameters only (I don’t use CALLable Signals). In the 2nd attachment you see how I wouldn’t run into the problem because of the standard approach for Fx (vs not-Fx).

    If you think it is worth the trouble, you could make a Technical Report of it (goes via the Help menu).
    And redundancy is never a good thing.

    Pieter_T thanked this post
    image_2023-06-13_042125299.png image_2023-06-13_042125299.png image_2023-06-13_042745044.png image_2023-06-13_042745044.png
    #216049 quote
    Pieter_T
    Participant
    New

    Just came to realise something looking at your first attachment. The smallest decimal you use in your example is 0.0011. I used this value as a test and it has no error. If I however change it to 0.0001 the error is back. I can however use 0.0011111 and there is no error. In summary, what I realise is that there cannot be more than 3 zero’s after the decimal point.

    I will submit a report and see if something comes of it.

    PeterSt thanked this post
    #216123 quote
    GraHal
    Participant
    Master

    there cannot be more than 3 zero’s after the decimal point.

    I agree as I’ve had the same experience with < 0.0001

    Pieter_T thanked this post
Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.

Error: Unknown Command. Code is invalid. Please correct it line 8:


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Pieter_T @pietertal Participant
Summary

This topic contains 18 replies,
has 4 voices, and was last updated by GraHal
2 years, 8 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 06/20/2022
Status: Active
Attachments: 8 files
Logo Logo
Loading...