Automatic Low of the day-tool
Forums › ProRealTime English forum › ProRealTime platform support › Automatic Low of the day-tool
- This topic has 8 replies, 2 voices, and was last updated 1 month ago by
Bossebus.
-
-
01/29/2025 at 4:06 PM #243186
Hi!
I hope Iam in the right part of the forum, otherwise, excuse me.
Iam swingtrading stocks through IB / PRT, and Iam always using LoD as my stoploss. Is there any tool or addon/indicator that I can use that either connect my xxx amount of dollar risk with LoD, or showing the LoD in % away?
Best Regards
Christoffer
01/29/2025 at 11:35 PM #243212Hi,
It is possible to create an indicator for this:
For example, you can display the “LoD” in the chart and show the number of points between the “Close” and the “LoD,” or display it as a percentage…
Maybe this is something for you…LoD1234567891011121314151617181920212223DefParam DrawOnLastBarOnly=True//RiskPerTradeRiskPerTrade=1000//LoDLoD=DLow(0)//CurrentPriceCurrentPrice=Close//Distance to LoDDistanceToLoD=CurrentPrice-LoD//Distance Percentage to LoDDistancePerc=Round(DistanceToLoD/Lod*100,2)DrawText("#DistancePerc#%",BarIndex,LoD+2,SansSerif,Standard,16)DrawText("LoD=#LoD# (Close-LoD=#DistanceToLoD# Points)",-200,25,SansSerif,Standard,16)Anchor(BottomRight)//Calculate PositionSizePositionSize=RiskPerTrade/DistanceToLoDReturn LoD as "LoD"1 user thanked author for this post.
01/30/2025 at 5:10 PM #243238Hi,
It is possible to create an indicator for this:
For example, you can display the “LoD” in the chart and show the number of points between the “Close” and the “LoD,” or display it as a percentage…
Maybe this is something for you…
LoD1234567891011121314151617181920212223DefParam DrawOnLastBarOnly=True//RiskPerTradeRiskPerTrade=1000//LoDLoD=DLow(0)//CurrentPriceCurrentPrice=Close//Distance to LoDDistanceToLoD=CurrentPrice–LoD//Distance Percentage to LoDDistancePerc=Round(DistanceToLoD/Lod*100,2)DrawText(“#DistancePerc#%”,BarIndex,LoD+2,SansSerif,Standard,16)DrawText(“LoD=#LoD# (Close-LoD=#DistanceToLoD# Points)”,–200,25,SansSerif,Standard,16)Anchor(BottomRight)//Calculate PositionSizePositionSize=RiskPerTrade/DistanceToLoDReturn LoD as “LoD”This is prob the best possible without going too deep into it. I only need the % number from this, as text otherwise covers that when I have many small chart. How would the formula be in that case?
Many thanks for taking your time!
01/30/2025 at 7:29 PM #24324501/30/2025 at 7:38 PM #243246I didnt describe that good. Its mainly this number I would like to be shown all the time. as I have a fixed $ amount as stoploss and I always use LoD as my SL-level.
Best case would be to have auto-quantity with LoD. But I guess that is alot more tricky to get.
Best Regards
01/30/2025 at 8:40 PM #243252I have adjusted the indicator for the calculation of the “PositionSize”…
The “PositionSize” is based on “RiskPerTrade” which you have to set up/adjust in advance (currently $100)…
The distance between the “Close” and the “LoD” is basically the “StopLoss” distance multiplied by the “PointSize” and divided by the “PointValue”…
The theoretical position size: PositionSize = RiskPerTrade / StopLoss (distance)
It is of course the theoretical position size because you use the “Close” instead of the (still unknown) “TradePrice”…
LoD and PositionSize123456789101112131415161718192021222324DefParam DrawOnLastBarOnly=True//RiskPerTradeRiskPerTrade=100//LoDLoD=DLow(0)//CurrentPriceCurrentPrice=Close//Distance to LoDDistanceToLoD=(CurrentPrice-LoD)*PointSize/PointValue//Distance Percentage to LoDDistancePerc=Round(DistanceToLoD/Lod*100,2)DrawText("#DistancePerc#%",BarIndex,0,SansSerif,Standard,16)//DrawText("LoD=#LoD# (Close-LoD=#DistanceToLoD# Points)",-200,25,SansSerif,Standard,16)Anchor(BottomRight)//Calculate PositionSizePositionSize=RiskPerTrade/DistanceToLoDDrawText("PositionSize=#PositionSize#",BarIndex,-0.2,SansSerif, Standard,16)Return //LoD as "LoD"01/31/2025 at 5:56 PM #243288Is it possible to create something that makes marketorders use LoD as SL, automatic? Using the chosen $ risk?
Also, how would this indicator code look with only the % number shown and nothing else?
Thanks for taking your time, apperciate it alot!
01/31/2025 at 6:37 PM #243289When we transform the indicator into a strategy, it is possible to generate market orders under certain conditions, using “LoD” as StopLoss…
You need to specify the conditions under which the market orders are generated (for example, when and under what conditions we go Long or Short)…
If you do not want to see certain output from the indicator, you can use two forward slashes for the relevant line.
For example, if you no longer want to see “PositionSize,” you can add two forward slashes before line 23…
//DrawText(“PositionSize=#PositionSize#”,BarIndex,-0.2,SansSerif, Standard,16)
01/31/2025 at 7:53 PM #243293 -
AuthorPosts
Find exclusive trading pro-tools on