Announcement

Collapse
No announcement yet.

Help with Backtesting and Drawing Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Backtesting and Drawing Functions

    Hi everyone!

    While my learning curve is getting better at writing programs, I still run into a problem that stubs me and need help on.

    While copying and pasting and testing different programs, I come across this particular problem quite often. My program doesn't draw correctly. I know that I'm doing something wrong..... and due to the lack of knowledge in Java Script and E-Signal 's LACK of HELP files, I am not able to correct why my programs do not draw correctly.

    Will someone please correct the attached program and EXPLAIN to me where I went wrong.

    Thanks to all out there who continually help the helpless!!!!!

    ang
    ang.

  • #2
    Here is the attached file... for some reason the first didn't go thru.
    Thanks for any help.
    ang
    Attached Files
    ang.

    Comment


    • #3
      ang
      The commands in lines 126-130 will never paint the price bars in red. To do that the strategy must not be in a trade and be short which is not possible. The error is in the }else{ in line 128 which relates to if(Strategy.isInTrade() and not to if(Strategy.isLong()
      The commands in lines 136-141 will execute only once (on the first trade) in the context of your system This is because you have a stop and reverse system which will always be in the market hence Strategy.isInTrade() will always return true (except at the very beginning). The condition in line 135 however is looking for it to be false which as I said will happen only on the first trade.
      The text labels used in the drawTextRelative() commands in lines 160 and 167 are inverted ie you have "Sell" when going long and "Buy" when going short.
      All the above are errors of logic and truthfully no Help file - no matter how detailed - can assist you in correcting them. Regardless in the EFS KnowledgeBase you can find the Guide to Developing eSignal Strategies and the Guide to Developing eSignal Graphics both of which should provide you with complete sets of examples.
      Alex

      Comment

      Working...
      X