Pause Bot after hitting 1% Per Day
Forums › ProRealTime English forum › ProOrder support › Pause Bot after hitting 1% Per Day
- This topic has 9 replies, 3 voices, and was last updated 2 years ago by robertogozzi.
-
-
10/25/2021 at 3:03 PM #180324
Dear all,
I have 2 questions and I hope I’ve posted them in the right place.
- 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? - 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…10/25/2021 at 4:03 PM #180327I 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:
123456789101112131415161718ONCE MyCapital = 10000 //10000 units of your accountONCE PerCent = 1 //1%ONCE TradeON = 1ONCE MyProfit = 0ONCE MyLimit = MyCapital * PerCent / 100IF IntraDayBarIndex = 0 THENTradeON = 1 //enable trading each new dayMyProfit = StrategProfitENDIFIF (StrategyProfit - MyProfit) >= MyLimit THENTradeON = 0 //disable trading after earning PerCentENDIFMyLongConditions = Not OnMarket AND close CROSSES OVER Average[10,0](close)IF MyLongConditions AND TradeON THENBUY 1 Contract at MarketSET STOP pLOSS 20SET TARGET pPROFIT 60ENDIF1 user thanked author for this post.
10/25/2021 at 4:14 PM #180330Thank 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 THENBUY 1 Contract at MarketSET STOP pLOSS 20SET TARGET pPROFIT 60ENDIF10/25/2021 at 4:16 PM #180331I 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 :
123MyProfit = StrategProfit// should beMyProfit = StrategyProfit1 user thanked author for this post.
10/25/2021 at 4:20 PM #180333can 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.
1 user thanked author for this post.
10/25/2021 at 4:21 PM #180335Thank 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! :):):)
10/25/2021 at 4:43 PM #180344Actually 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)1 user thanked author for this post.
10/25/2021 at 4:54 PM #180348Actually 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.11/01/2021 at 3:18 AM #180711Hi 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?
11/01/2021 at 10:33 AM #180736This exactly the code you need https://www.prorealcode.com/topic/pause-system-after-2-losses/#post-173516
- 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).
-
AuthorPosts
Find exclusive trading pro-tools on