Sorex hoyi scalper

Forums ProRealTime English forum ProOrder support Sorex hoyi scalper

Viewing 15 posts - 16 through 30 (of 30 total)
  • #126111

    if barindex>1 and range>0 then 1 if barindex>1 and range>0 then and/or when there’s possibly no data i.e. the max function max(abs(open – close), 0.000000001) 1 max(abs(open – close), 0.000000001) can also be used on an average I think, like max(ExponentialAverage[20](close),0.000000001) 1 max(ExponentialAverage[20](close),0.000000001) I don’t now where exactly is the cause, so in the renko version I use above a lot.


    @Paul
    – thanks for this info. Where do I enter this in the code?

    I tried to figure it out by searching the forum but can’t seem to get it right.

    #126113

    Has anybody tried a fix on the code below (as in something similar to what Paul offered)?

    Reason: if there is no volume then we will get ‘divide by zero’ errors?

    How about …

    OR

    OR

    ….

     

    #126118

    the second for me 😉

    just a question, as there isn’t volume on CFD account but only on Future, i always have doubts about the valuation on the volume used on cfd.. and thus, the strategy. do you agree ?

     

    #126119

    as there isn’t volume on CFD account

    There is volume on Indexes and Shares just not on Forex.

    #126120

    i understand that the volume on CFD have no interest.. it’s not the volume on limited cfd that have an impact on the market

    #126122

    i just see it’s the code of the  VWAP..

    The VWAP can only be calculated for markets like those of futures which publish their order volume. TWAP is an identical concept but can be used for instruments such as CFDs or Forex, the volumes of which are not available. 

    #126123

    I actually removed the VWAP part of the code as it wasn’t necessary. I still can’t make it work with demo forwardtesting due to the division by zero issue though.

    #126124
    #126125

    I actually removed the VWAP part of the code as it wasn’t necessary. I still can’t make it work with demo forwardtesting due to the division by zero issue though.

    check all your divisions, there is necessarily a division in your code which is problematic

    #126130

    Or bars with no data?

    Or NO bars at all at times?

    Or Close = Open

    Or some other weird occurence? 🙂

    You could // out single  lines a time until you find which line is causing the divide by zero Issue?

     

     

    #126132

    That’s what I’m trying to do – yet I haven’t figured which part it is. I did however launch a pre-Paul version and it hasn’t yet done a trade but it hasn’t given me an error since I launched it 21 minutes ago – normally the error message comes up shortly after it goes live. I believe the division error must be part of the code Paul added — will post the solution when I figure it out.

    2 users thanked author for this post.
    #126133

    @eckaw I hope you figure it out.  an other strategy also came to a stop despite the changes, but it happens less frequently.

    1 user thanked author for this post.
    #126202

    i just have an question about the spreadmode

    why do you divide the spread by 2 after the determination of it ?

    //

    In order to have a backtest which works during all the time, it would be great if IG could transmit to PRT through an API the history of the average spread used per date time slot every day and then, get the spread/date time slot coming from PRT variables in order to to use them in backtest.

    #126273

    @makside; if you use spread 6 on dji and look at a price, you see a difference of 3 points with spread and without spread for either side.  (i.e. index=23850, long pays 23853, short pays 23847)

    i.e. long position when spread is high, stoploss 50points, pt 50 points, spread 6 backtest

    23850, spread 6/2=3  backtest paid 23853, stoploss 23803 and profittarget 23903

     

    with spreadmode on = more similar to live.

    23850, spread14/2=7 backtest paid 23857, stoploss at 23807 and profittarget at 23907.

    The most annoying thing is when live account reaches stoploss but not the backtest, or that backtest reached profittarget but not the live account or when the trailingstop kicks in. So somehow it’s better run an optimisation that uses an entryprice more closely to the real trading in 24h setup.

    I agree with you. It was an effort to reduce differences backtest & live, much better would be what you suggested.

    1 user thanked author for this post.
    #126274

    @Paul

    thx for your explanation.. nothing in simple 🙁

     

Viewing 15 posts - 16 through 30 (of 30 total)

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