Code fails to run – Insufficient Data!

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #178260 quote
    GraHalGraHal
    Participant
    Master

    Your solution looks good Roberto.

    IG sent smpaxton the wrong solution anyway as he never had a divide by zero error.

    smp thanked this post
    #178261 quote
    smpsmp
    Participant
    Average

    Roberto,

    Thank you, now that makes sense 👍🏻

    Steve

    #178340 quote
    deleted23092025deleted23092025
    Participant
    New

    GraHal

    I found this from ProRealTime documents. It says that the max PreLoadBars is 5000? So is it 5000, 10000? Or any other value?

    2F9C1B7A-92C5-423F-A0DA-14979B6A818C.jpeg 2F9C1B7A-92C5-423F-A0DA-14979B6A818C.jpeg
    #178370 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I tried this code (results are in comments).

    //DEFPARAM PreLoadBars = 0         //starts from 1000      (default value)
    //DEFPARAM PreLoadBars = 500       //starts from 500
    //DEFPARAM PreLoadBars = 5000      //starts from 5000
    //DEFPARAM PreLoadBars = 10000     //starts from 10000
    //DEFPARAM PreLoadBars = 11000     //starts from 10000     (any value > 10000 will be ignored)
    ONCE TradeON = 1
    SELL AT Market
    IF IsLastBarUpdate AND Not OnMarket AND TradeON THEN
       BUY at Market
       TradeON = 0
    ENDIF
    graph BarIndex

    The count is checked on the setup bar (the one BEFORE the arrow plotted by ProBackTest, the bar when the BUY order is placed).

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Code fails to run – Insufficient Data!


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
smp @smpaxton Participant
Summary

This topic contains 18 replies,
has 6 voices, and was last updated by robertogozzirobertogozzi
4 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/15/2021
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...