Initial balance condition

Forums ProRealTime English forum ProOrder support Initial balance condition

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 4 posts - 1 through 4 (of 4 total)
  • #177547 Report

    Hi. I’ve edited some code I found on here to create a simple initial balance indicator “Balance 15m NASDAQ”. See below.

    //15 min Time frame
    //Initial Ballance calculation
    //First Hour in the morning form 8:00-9:00 GMT+1 on DAX

    starttime = 143000
    endtime = 153000

    If Time = endtime then


    RETURN dif


    I want to use the following code as another condition before entering a trade

    //Initial balance
    myBalance15mNASDAQ = CALL “Balance 15m NASDAQ”
    c9 = (myBalance15mNASDAQ <50)

    But when I back test the results are unaffected? Even when I change to <5 for example?

    What am I doing wrong please?


    Tried it like this too, same result?

    //Initial balance
    myBalance15mNASDAQ = CALL “Balance 15m NASDAQ”

    //Conditions to enter long positions
    indicator1 = ExponentialAverage[7.8](close)
    indicator2 = ExponentialAverage[12.6](close)
    c1 = (indicator1 CROSSES OVER indicator2)

    IF c1 AND myBalance15mNASDAQ <50 AND not daysForbiddenEntry THEN



    #177561 Report

    My code works fine.



    I think your code actually opened a trade, but it was left open as no SL or TP were planned (test it again and check among opened orders).
    Adding SL and TP should work it out.

    1 user thanked author for this post.
    #177580 Report

    Thank you.

    Did you have to change anything? I’ll have a go at inserting your code tomorrow. This is only a section of the code, I have a SL set and exit parameters too further down.


    Thanks again I really appreciate this, I’m very new to this with lots to learn .

    #177586 Report

    I’ve got it working as part of my algo now. I’m not sure why it wasn’t working originally? Must have been syntax?

    Thanks again.

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login