Pause Bot after hitting 1% Per Day

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #180324 quote
    fxhunter183fxhunter183
    Participant
    New

    Dear all,

    I have 2 questions and I hope I’ve posted them in the right place.

    1. I’ve just started using the Wizard to create a very simple trading bot and I am in the midst of going through the Training Program (Part 1).
      I would like to seek your opinions if I should pay $95 to proceed with the advanced program course or are there any other sources of information that can help me further build my system?
    2. I would like my current trading system to stop/pause trading for the day once it hit a 1% target return per day on capital and continue after a stipulated time. Is this doable in ProRealTime and could someone advice any source code for this?

    Thank you for your time.
    Learning in Progress…

    #180327 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I don’t know that corse. Actually I don’t know of any course.

    You know your current level and have read any description, so I thinkyou may decide. Maybe someone who has taken that course may help you further.

    As for the code, there you go:

    ONCE MyCapital = 10000    //10000 units of your account
    ONCE PerCent   = 1        //1%
    ONCE TradeON   = 1
    ONCE MyProfit  = 0
    ONCE MyLimit   = MyCapital * PerCent / 100
    IF IntraDayBarIndex = 0 THEN
       TradeON  = 1                   //enable trading each new day
       MyProfit = StrategProfit
    ENDIF
    IF (StrategyProfit - MyProfit) >= MyLimit THEN
       TradeON = 0                    //disable trading after earning PerCent
    ENDIF
    MyLongConditions = Not OnMarket AND close CROSSES OVER Average[10,0](close)
    IF MyLongConditions AND TradeON THEN
       BUY 1 Contract at Market
       SET STOP   pLOSS   20
       SET TARGET pPROFIT 60
    ENDIF
    fxhunter183 thanked this post
    #180330 quote
    fxhunter183fxhunter183
    Participant
    New

    Thank you.
    Apologies, can I trouble you to explain this part of the code? Is this a code instruct a buy order with stop loss at 20 pips and profit at 60 pips?

    MyLongConditions = Not OnMarket AND close CROSSES OVER Average[10,0](close)
    IF MyLongConditions AND TradeON THEN
       BUY 1 Contract at Market
       SET STOP   pLOSS   20
       SET TARGET pPROFIT 60
    ENDIF
    #180331 quote
    PeterStPeterSt
    Participant
    Master

    I don’t know that corse. Actually I don’t know of any course.

    Maybe you do … In the attachment shows one example. There are more to be found in the Market Place.

    fxhunter, if I were you I would start with this boat load of videos : https://www.prorealtime.com/en/videos_tutorial
    (but pick the ones you think you need)
    That should keep you busy. 🙂

     

    PS: There’s a small typo in Roberto’s example on line 8 :

    MyProfit = StrategProfit
    // should be
    MyProfit = StrategyProfit
    
    
    
    fxhunter183 thanked this post
    image_2021-10-25_170857.png image_2021-10-25_170857.png
    #180333 quote
    PeterStPeterSt
    Participant
    Master

    can I trouble you to explain this part of the code? Is this a code instruct a buy order with stop loss at 20 pips and profit at 60 pips?

    Lesson #1 : The code (any code) is called once per close of bar. The length of the bar (the TimeFrame) can be chosen by yourself. Thus if you have 5 minutes bars, this code is automatically executed each start of a next 5 minute frame.

    fxhunter183 thanked this post
    #180335 quote
    fxhunter183fxhunter183
    Participant
    New

    Thank you.

    Actually I was referring to this,, https://www.prorealcode.com/courses/prorealtime-advanced-programming/ because i would like to learn how to code what I would like to see in the system.
    In the event, I give up, I am ready to do this.  https://www.prorealcode.com/trading-programming-services/

    Thanks for clarifying the typo.

    haha! :):):)

    #180344 quote
    PeterStPeterSt
    Participant
    Master

    Actually I was referring to this,, https://www.prorealcode.com/courses/prorealtime-advanced-programming/ because i would like to learn how to code what I would like to see in the system.

    Haha, yes, that is the same as the one I referred to. The author is the same as the person hosting this website (Nicolas) so it is always advisable (says me).
    But those videos I linked to are also from him … as far as I know …

    And if everybody starts to follow such courses, Roberto may have some more free time. 🙂
    (although it will be what he likes to do – pulling all those coding examples from his sleeve)

    fxhunter183 thanked this post
    #180348 quote
    fxhunter183fxhunter183
    Participant
    New

    Actually I was referring to this,, https://www.prorealcode.com/courses/prorealtime-advanced-programming/ because i would like to learn how to code what I would like to see in the system.

    Haha, yes, that is the same as the one I referred to. The author is the same as the person hosting this website (Nicolas) so it is always advisable (says me).

    But those videos I linked to are also from him … as far as I know …

    And if everybody starts to follow such courses, Roberto may have some more free time. 🙂

    (although it will be what he likes to do – pulling all those coding examples from his sleeve)

    Great. I’m gonna go through that.
    I’m starting clueless…… long road ahead.

    #180711 quote
    fxhunter183fxhunter183
    Participant
    New

    Hi there,

    I need some help with the code to pause the trading bot for the day once 2 Stop limit is hit within 1 trading day.
    I did find the something relevant but i don’t think that’s really want i need. https://www.prorealcode.com/topic/pause-system-after-2-losses/

    Let me know if i should have started a new thread for this.

    Just to confirm my understanding, codes to pause the trades after hitting 1% and after hitting 2 stop limit, should be placed before the buy/sell conditions since systems read codes sequentially?

    #180736 quote
    robertogozzirobertogozzi
    Moderator
    Legend
Viewing 10 posts - 1 through 10 (of 10 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

Pause Bot after hitting 1% Per Day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
4 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/25/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...