Storing lowest/highest price on Variables
-
Hi the logic that I want to get is:
1.-Candle conditions is met, then
2.- Candle lowest (for longs, highest for shorts) is stored on variables (and it must not be deleted until pending order is opened or expired...
3.-How to save those having more than 1 pending order opened?The problem: Every time that another pending order is opened (at same time than other is opened), the variable reset and get the data from the new price (lowest/highest)


-
@Uriel-0 Sorry, I'm trying to put Pinned but is not getting. Blocks 40 is for the storing to longs, 112 is for storing of Shorts. 40 block is for the block condition 156, that if price is lower than the variable level, then delete long pending order. Viceversa for 112 and 174 blocks.
-
Hi @jstap , do you have any another idea of how to save the lowest/highest (1) price every time that a new pending order is opened? Just to cancel it if price break the variable. Please:)
-
Use candle 1, not highest/lowest price, on trade tab will give you the price once a trade has opened.
-
@jstap Nice. But would it works if I store at same time some candles because new pending orders are opened? I mean, it would not be changed every time a new pending order is opened? I Will test it also
-
Hi @roar , could you help me with this? please
-
You would have to use logic to decide what and when to store where.
-
@jstap Sure, as I put before, I use the variables to put highest/lowest level of candle (1) just when a pending order is put. The problem is when there are 2 or more Types (the same e.g. 2 buy pending o) because the variable be changed by the Candle 1 of the new pending order. What I want is save the highest/lowest (this is for delete the pending if price crosses the level) and that it don't be affected if is open or more, then those have save its own level
-
You can use (for example) check trade count, or for each trade, to limit actions to the trades running.
-
@jstap sure, I have put it (As the link above). But the idea is works with more than 1 pending order of the same type at same time without be affected for the new variable data
-
Once a pending order becomes a trade it is then usable as a number, you can save the ticket number, then use this to reference the trade.