output a distinct value?

Forums ProRealTime English forum ProOrder support output a distinct value?

Viewing 7 posts - 1 through 7 (of 7 total)
  • #46496

    Hello, I have problems with a complicated loop.
    I think it would help me if someone could tell me whether the following is possible:
    If I want to define a certain value like low [1] as selltrigger.
    Is it possible to output this value as a concrete number,
    in order to calculate with this number later in the process?
    For example the low [1] was 89,10 EUR I want to code the Stop-Loss condition as:

    if close<89,10 then
    Sell size SHARES AT MARKET

    I don´t want to code:
    if close<low [1] then
    Sell size SHARES AT MARKET!

    Thanks for help 🙂

    #46499

    You can store any value in a variable and use it later in your code:

     

    1 user thanked author for this post.
    #46501

    Hello Nicolas, thanks for your answer! Sounds great.

    Unfortunately, it does not work for me. When I run the code, I always get the error: “conditiontostore is not defined”(in german: Die folgende Variable ist nicht definiert:conditionToStore”…

    Any idea?

    #46526

    Hello again,

    now I see that what I wrote above was nonsens. I missinterpreted “conditionToStore” as a comand….

    Here is my lousy code (I know it is not good and can´t work this way…). But since I am a beginner, maybay someone could help me with my approach.

    _________________________

     

    #46551

    For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<

    If you want to trade the breakout of 2 defined levels, I suggest to use pending STOP orders instead. These pending orders will be set for the four following bars after an Hammer has been identified by the indicator you are “calling”:

    Please test the code and make comments.

     

    1 user thanked author for this post.
    #46591

    Thank you Niklas that helps me very very much!

    Without you I would never have come to this solution!

    Best wishes

    Michael

    #46645

    I made a typo while copy/paste your code in my last post, the correct code should be:

    Sorry for inconvenience 😐

    1 user thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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