Created indicator showing different result when used in a trading system

Forums ProRealTime English forum ProBuilder support Created indicator showing different result when used in a trading system

Viewing 6 posts - 1 through 6 (of 6 total)
  • #71019

    Hi all,

    quite new in prorealtime and trying to slowly getting the hang of coding.

    I recently created a code based on ichimoku and to make sure that my codes are correct I have created a “drawvlines” if the criteria matched hence considered to execute a buy.

    what I found out is that there are 2 instances where are vertical lines in the chart but it was not executed and 1 that do not have vertical line but is executed.

    here is the trading system

    I removed all SL or TP just to really see how it is being executed.  Hope anyone can help or point out what I did wrong.

    thanks

    #71046

    You can try to debug with:

    The boolean condition should then be plotted on your backtest chart. If it is true, then your order is launched. Just try to compare what this variable is returning both in the indicator and the strategy.

    #71052

    Thank you Nicolas.  will sure try this once i get hold of my pc.

    as a follow up though, would this also show the same number and time of open trades provided in the detailed report of the backtesting?

    if yes, then if will just confirms the discrepancy of expected result using the same criteria/code for indicator and proorder.

    #71090

    You can try to debug with:

    The boolean condition should then be plotted on your backtest chart. If it is true, then your order is launched. Just try to compare what this variable is returning both in the indicator and the strategy.

    Hi Nicolas, the graph helps but actually an arrow up does show up for every buy position on my back test.  if you can seen in my attachment, there is 1 with a buy arrow but no vline, while the 2 screenshots are without buy arrows but a vertical line showing inconsistency on handling the condition i set.

    #71095

    Yes, but you should first return the variables when you are debugging 🙂

    So first from starting from B5a, if the trades are actually triggered if B5a>0, if yes, move on to next variables “B”, etc.. and compare it to indicator, and so on…

    1 user thanked author for this post.
    #71120

    Thank yo Nicolas.  i was able to find the error.  a cross over in the trading system does not consider a situation where the 2 lines are the same on previous close while under indicator, it is considered as crosses over

Viewing 6 posts - 1 through 6 (of 6 total)

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