Smart money indicator (using Arrays)

Forums ProRealTime English forum ProBuilder support Smart money indicator (using Arrays)

Viewing 3 posts - 16 through 18 (of 18 total)
  • #218018

    Just a suggestion monochrome,  not sure of the programming challenge though.  How about we only draw if the distance between previous and current low or high is > say 30 points (variable can be used dependingon instrument). Most of the time markets are ranging and with high spread and stop loss,  trades doesn’t make sense anyway.

    Regardless of timeframe, this strategy will avoid Cluttor on chart with prior calc done before drawing , and provide a clear see through area worth to trade in anticipation of fill?

    Sl can be higher or lower of current or previous bars and target is the high or low identified!

    I tried loading with only 500 bars and its manageable

    #218027

    We can add a minimum distance before detection to reduce the noise. Personally I like to see all the gaps.
    It will still be slow when backtesting. When I get time I’ll see if I can recode it so there’s a set limit of arrays and rearrange as roberto and Peter suggested. I need to search the forum for prev examples of such code.

     

    Not tested as replying from phone.

    #221395

    Hi,

    in case you are still using this and would still want to gain a bit of speed, I had a look at it as part of my late unread summer posts. By the way as Roberto said above, many needed help. This topic came the day after I had to be offline for a few weeks for personal reasons and I thank Nicolas and Roberto for their offline support during these few weeks, and even now as I still have to be offline sometimes.

    Basically, your loop ends up being very big with gapsindex continuously growing, but as importantly, you do lots of unnecessary calculations inside it, you can avoid most of them  (perhaps all, would require a closer look) with the if statements structure modified as follows.

    Also, this is a drawonlastbaronly=true code, so why would you keep graphic commands done on any bar not being the last one? At code launch you wouldn’t see any of the graphics asked during previous bars of history anyway as only the latest graphic output would appear, but you would still “pay” the time spent on executing the graphics commands (done many more times than you see it written because of the loop avg size multiplied by the number of bars the loop is executed). An “if islastbarupdate” can reduce this by not spending time on graphics not displayed. All together, early test show time reduced by more than 2 when applying these modifications on code from post #217882:

     

     

Viewing 3 posts - 16 through 18 (of 18 total)

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