Creating a trading system from scratch

How many lines of code you are comfortable with


  • Total voters
    61

VJAY

Well-Known Member
Dear UB,
Are you made any rule for enter trades in which missed due to open=high?Mostly trades of this scenerio gives good profitable trades....
 

VJAY

Well-Known Member
Dear UB,
also make some code to avoid some scrips from output manually which is from same sector...eg today 3 top scrips in nifty 50 is from banking....if we increase scrip nos and avoid some scrips its allocation also coming diferent...eg if I trade with 3 scrips ....if I skip 1 or 2 for it and use next 2 scrips using 5scrips output alocation are spreads in for 5 scrips not for 3 scrips....Hope you understand what I explained...
 

UberMachine

Well-Known Member
Dear UB,
also make some code to avoid some scrips from output manually which is from same sector...eg today 3 top scrips in nifty 50 is from banking....if we increase scrip nos and avoid some scrips its allocation also coming diferent...eg if I trade with 3 scrips ....if I skip 1 or 2 for it and use next 2 scrips using 5scrips output alocation are spreads in for 5 scrips not for 3 scrips....Hope you understand what I explained...
Diversfying different sectors is a good strategy (H2D does it but the code is a bit complex so I am holding it back).
Regarding number of scrips, I think the strategy would adjust the allocation based on capital. So in case of 1 stock, the entire capital would be allocated if case of 2 it would be split into half and so on.
Also, in case of skipping we must be consistent with the rules of skipping such as skip the stock if its up by 10% or skip it if the preopen return is in negative and so on.
Could you provide an example?
 

VJAY

Well-Known Member
Diversfying different sectors is a good strategy (H2D does it but the code is a bit complex so I am holding it back).
Regarding number of scrips, I think the strategy would adjust the allocation based on capital. So in case of 1 stock, the entire capital would be allocated if case of 2 it would be split into half and so on.
Also, in case of skipping we must be consistent with the rules of skipping such as skip the stock if its up by 10% or skip it if the preopen return is in negative and so on.
Could you provide an example?
1537939837787.png

This is todays 3 scrip output...here all are banking stocks so i want to skip 2 and will check next scrips using 5 scrips in system ...now I get these scrips in order file
1537940000517.png

So I use HDFC,SUNPHARMA & Maruthi...but when using like this its alocationgoes like for 5 scrips I want only 3 scrips and correct alocation like which I get when using 3 scrips system....need to manully remove scrips which is from same sector but alocation not change
 

VJAY

Well-Known Member
Dear UB,
Today just played with your code for getting daily profit and open-high profits ...i got daily profit...also I got daily open-high figure but one error showing on it...can you please give solution for this error?
1538011307837.png
 

UberMachine

Well-Known Member
Dear UB,
Today just played with your code for getting daily profit and open-high profits ...i got daily profit...also I got daily open-high figure but one error showing on it...can you please give solution for this error?
View attachment 28803
This is just a warning.
Put orders.tail() in one line and the other code in next line and the warning would go away
 

Similar threads