Max Lost per day

Viewing 15 posts - 1 through 15 (of 18 total)
  • #214057

    Hi everyone,

    The idea is simple and here are the rules :
    – Counting losses per day
    – If my loss is more than 10 per day then I stop trading for the day
    – If my loss is more than 40 per week then I stop trading for the week

    #214059

    So you are calculating the loss in money and creating condition upon all these variables? Can you share an example for reference and for the benefit of other users please? 😉

    1 user thanked author for this post.
    #214098

    The aim is to integrate the rules on this code, We will call this idea of Money management idea B, you can participate or propose another idea on this post

    maybe we can create a boolen TradeOnOff for use it as a filter, somethink like this :

    I’m not sure how to do this, if you have any ideas or links on the forum

    lest say this named rules :
    A: Counting losses per day
    B: If my loss is more than 10 per day then I stop trading for the day
    C: If my loss is more than 40 per week then I stop trading for the week
    D: If my loss is more than 100 I stop trading for hole month

    E: We will also try to keep track of the winnings, and why not add a small part of the winnings to allow us to bet more

    #214110

    for the B rule I think this boolen as a condition is ok :

    for the C rule I think this boolen as a condition is ok :

    and for buy condition we have to test this both boolen with buy condition like this :

    what do you think ? and if some one can help for count week losses for add the D rule ?

    tks in advance for any help or link

    #214112

    I correct myself for the DayOfWeek function, is there a function to retrieve the current week or do you have to divide the DayOfWeek function by 7 ?

    and does Sunday exist? DayOfWeek = 7 ?

    #214118

    https://www.prorealcode.com/documentation/currentdayofweek/

    https://www.prorealcode.com/documentation/currentmonth/

    https://www.prorealcode.com/documentation/category/dateandtime/

    Strangely there isn’t listed CurrentWeek

    I’m fairly sure Sunday = 0 and so Monday = 1 … etc

    1 user thanked author for this post.
    #214122

    I see that I am asking too many questions 😅,

    I just did a test on a market that is open all the time and yes, I can confirm that Sunday is 0 and Saturday is 6, you can see in the photo : Sunday = Dimanche

    #214124

    and yes they haven’t CurrentWeek or WeekOfMonth :

    1 user thanked author for this post.
    #214157

    Complete list is:

    CurrentTime: Current HourMinuteSecond (the market one).
    CurrentSecond: Current (market) second.
    CurrentMinute: Current (market) minute.
    CurrentHour: Current (market) hour.
    CurrentMonth: Current month (the market one).
    CurrentDayOfWeek: Current day of the week.
    CurrentYear: Current year (that of the market).
    Today:Date of the current day (that of the market)
    Yesterday:Date of the previous day of the market.

    #214159

    Tks you @Nicolas

    How do we know which week of the year or which week of the month it is?

    #214160

    Start to count on year change:

    #214163

    Tks you, and how to know which week in the month we are, exemple the first or second week of the month pls ?

    #214168

    Nothing like a week of a month exists. 🙂
    I mean, in reality. Or else you are going to tell me ? haha

    #214185

    I don’t have an answer yet, but I think with Nicolas’ answer there is a way to do something with maybe divisions and the Day function to know which week you are in the month or in the year

     

    And Maybe you have an answer for me in this thread Link here

    #214186

    The first week of the year is week #1 and it is the one in which 4+ days belong to the new year (4, 5, 6 or 7,  while 1, 2 or 3 is the last week of the prior year). From there on you start counting up to 52 (occasionally 53) weeks.

    Some hints at https://www.prorealcode.com/topic/tomorrows-date/.

     

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 18 total)

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