Coding Profit and Loss indicator , need help

Forums ProRealTime forum Français Support ProBuilder Coding Profit and Loss indicator , need help

Tagged: , , ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • #3437

    A try to create an Earn & Loss’s indicator

    I’m sorry for my bad english, i’ll do my best. Thanks for your understanding
    By observing the curve Earnings(Gains) and losses of Prorealtime, I noticed..
    – Earnings, it is only the price’ curve which evolve in hight direction , synchronized with a strategy,like  a SellShort while the prices evolve in the low direction.
    -Losses, it is only a price’symmetry  on an axis X (wich must be identified),  Buying while the prices evolve in the low direction.
    I tried to coding into my thought. The result contains somes anomalies. I need your help to erase thoses anomalies
    Best regards

    Bonjour
    En observant la courbe Gains et pertes de Prorealtime, j’ai constaté..
    – les gains, ce n’est que la courbe des prix qui évoluent à la hausse en synchronisation avec une strategie, (une strategie de VADE pendant que les prix evoluent à la baisse)
    – les pertes, ce n’est que la symétrie des prix sur un axe X ( à identifier),  desynchronisé avec une stratégie (une strategie d’ACHAT pendant que les prix évolue à la baisse).
    J’ai tenté de coder dans le sens de cette reflexion. Le résultat comporte des anomalies.  Je sollicite votre aide pour corriger les anomalies.

    Merci d’avance pour vos contributions
    Bien à Vous

     

     

    #3439

    MyGainsPertes

    An example of the anomalie.

    #3448

    Hello RicLg,

    If you just want to have your profit and loss curve coloured by trade side (long or short), just use my adapted code below. It’s a quickly fix I made, i think that your curve problem came from a non-adapted use of the ‘couloured by’ instruction.

    Here is how it looks now :

    profit and loss indicator

     

    #3450

    Hello Nicolas

    I tested the code with the modifications proposed,  Anomalie’s problem still remains

    i think the problem may come in section  /// Achat ///  GainsPertes=close[cpt]

    I’t can make difference but scale is Enf of day .

    MyGainsPertes2

    #3453

    You’re right, I think that the problem is that you store the candlestick Close at each new trade as the start of the next curve section. But you should use the last known value of the curve instead, because it is where your “profit and loss” curve may continue.

    I’m currently trying to recode the whole thing in my own point of view, it gives me headache 🙂 Should not code at Sunday evening 🙂

    #3458

    Thanks Nicolas and i’m sorry for your headache  , i go on on my coding, with another approch, hihihi

    We may compare the final search at the end.

    #3465

    Hello, Nicola

    Do you think the same code would work in Intraday?

     

    *Could we have a pre-visualization before submiting a topic?

    #3478

    Hello Ric, you can edit your post after it has been submitted, there are buttons just above your avatar. And yes this code would work for any timeframe, I dont see any restrictions that could make it not fully function in intraday! 🙂

    #3480

    Do you mean the avatar inside the topic submited? if so there are no buttons allowing re-edit.

    Is the avatar of the login?  same remark

    #3483

    You only have 5 minutes to edit your last post :

    forum edit

     

     

    #3486

    Surprenant, Firefox 39.03  affiche uniquement Reply et #3480 ,et rien d’autre

    Windows 7  (64 bit)

    noEditButton

    #3811

    Bonjour,

    Voici le code complet dans son état actuel, cela necessite quelques ajustements très certainement.

    Merci pour vos suggestions et amélirations.

    A bientôt

     

    G&P_prcode

    * En journalier – End of Day

    * Pourriez-vous confirmez si cela fonctionne en intraday , s’il vous plait, Merci

    * Could you confirm if the code will work in Intraday, thank you.

     

    #3963

    Merci RicLG ça semble fonctionner correctement!

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

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