NexusFi: Find Your Edge


Home Menu

 





Robots Unleashed - a beginners algotrading journey


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one FastNCurious with 56 posts (65 thanks)
    2. looks_two vmodus with 26 posts (16 thanks)
    3. looks_3 kevinkdog with 18 posts (32 thanks)
    4. looks_4 SMCJB with 17 posts (28 thanks)
      Best Posters
    1. looks_one kevinkdog with 1.8 thanks per post
    2. looks_two SMCJB with 1.6 thanks per post
    3. looks_3 FastNCurious with 1.2 thanks per post
    4. looks_4 vmodus with 0.6 thanks per post
    1. trending_up 19,690 views
    2. thumb_up 154 thanks given
    3. group 22 followers
    1. forum 126 posts
    2. attach_file 0 attachments




 
Search this Thread

Robots Unleashed - a beginners algotrading journey

  #81 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


SMCJB View Post
Try trading Bitcoin! With Bitcoin at $60k, a CME future has a notional value of $300k and a marginn requirement of about $125k!

Yeah, no thanks on the BTC futures, and bless those who trade them. For those margins I might as well trade spot BTC and take on the risk myself. I'll just hold the BTC and other crypto I have and let everyone do the hard work to drive the price.

SMCJB View Post
There's a certain Murray Ruggiero Intermarket Strategy that is openly available on the internet that has passed the club multiple times (that I know of) by different entrants.

The story of my life!

There are many hidden gems in some of the SF club bounties and awards, hidden in comments or functions (I have a whole set of patterns I found in one of the functions).

Like you.... only so much time.

@FastNCurious .... you can have your journal back now.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #82 (permalink)
 
FastNCurious's Avatar
 FastNCurious 
saint louis MO
 
Experience: Intermediate
Platform: TradeStation
Trading: NQ, ES, YM, CL, GC
Posts: 149 since Oct 2017
Thanks Given: 95
Thanks Received: 177

I asked this question of @ABCTG but I though it would benefit others to have it in my journal as well. Also, it help me keep a log of all my inquiries on here.

I am trying to create a trailing stop that moves my stoploss up to a specific positive value after the trade reaches the first target. I do not want it to be a percentage because as the first target is hit my next target is 2x first target and I want the difference to be the same value
from entry to original stoploss as the 1st profit threshold to 2nd stoploss.

(entry price - stoploss 1) = (profitthreshold1-stoploss 2)

I know I am asking a very simple question but for the life of me I can't figure it out.

I thought about moving the stoploss to a negative value since it is on the opposite side of a negative loss compared to the entry price. I don't think this will work but I will give it a try.

I have also had this idea come up before because I wanted to set a breakeven stop to breakeven plus a few ticks in the positive direction so I will more than likely not eat any slippage and commissions on a breakeven trade. I was unable to figure this out before but I imagine once I have the answer for one the other would be quite easy.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #83 (permalink)
 
FastNCurious's Avatar
 FastNCurious 
saint louis MO
 
Experience: Intermediate
Platform: TradeStation
Trading: NQ, ES, YM, CL, GC
Posts: 149 since Oct 2017
Thanks Given: 95
Thanks Received: 177



ABCTG View Post
@FastNCurious,

I am not sure I follow you correctly as you seem to have the equation laid out already. You would just have to solve it for "stoploss 2":

stoploss 2 = profitthreshold1 - (entry price - stoploss 1)

You might want to consider using an actual stop order here instead of using negative values for "setstoploss".

Regards,

ABCTG


What a simple answer! Just solve my own equation for stoploss2. But instead of using the reserved word setstoploss just use a stop order that is triggered by profit threshold 1

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #84 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


FastNCurious View Post
What a simple answer! Just solve my own equation for stoploss2. But instead of using the reserved word setstoploss just use a stop order that is triggered by profit threshold 1

Thanks for sharing, as I had the same problem several weeks ago. I solved it by referencing the code from the ATR Trailing LX (and SX for short) strategies that are in TS. That is a great little piece of code for setting up a trailing stop and one I've used successfully.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #85 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,386
Thanks Received: 10,206


FastNCurious View Post
I do not want it to be a percentage

If your using continuous futures contracts you can not use percentages, returns, ratios, or anything that involves division or multiplication of the continuous contract price. Every roll-over the back adjusted history changes, so the percentages, returns, ratios all change as well, meaning any backtest is inaccurate.

Reply With Quote
Thanked by:
  #86 (permalink)
 
FastNCurious's Avatar
 FastNCurious 
saint louis MO
 
Experience: Intermediate
Platform: TradeStation
Trading: NQ, ES, YM, CL, GC
Posts: 149 since Oct 2017
Thanks Given: 95
Thanks Received: 177

So I have had this idea for a long time and I would like to figure it out finally! What I am seeking is a way to send to an excel file daily/weekly settled account equity to keep track of portfolio performance. If anyone knows of an easy solution for this I would really be interested in the help. I'm not sure if I need to write a strategy to keep track of this or maybe a function exists already.

Feel free to add to my journal any ideas.

I wonder if Portfolio Maestro would be good for this. I will investigate.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #87 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,386
Thanks Received: 10,206

What does "settled account equity" mean?

Futures accounts normally have several values
  1. Mark to Market of Open Positions
  2. Cash
  3. Margin Requirement of Open Positions
Which leads to
  1. Account Value / Net Equity = 1 + 2
  2. Excess Liquidity = 1 + 2 - 3

I've never used these, but in easy language functions that reference things like this are

Beginning Day Basis
  • GetBDAccountEquity
  • GetBDAccountNetWorth
  • GetBDCashBalance
  • GetBDTradeEquity
Real Time Basis
  1. GetOpenOrderInitialMargin
  2. GetRTAccountEquity
  3. GetRTAccountNetWorth
  4. GetRTCashBalance
  5. GetRTInitialMargin
  6. GetRTMaintMargin
  7. GetRTRealizedPL
  8. GetRTTradeEquity
  9. GetRTUnrealizedPL

Reply With Quote
Thanked by:
  #88 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


SMCJB View Post
What does "settled account equity" mean?

Futures accounts normally have several values
  1. Mark to Market of Open Positions
  2. Cash
  3. Margin Requirement of Open Positions
Which leads to
  1. Account Value / Net Equity = 1 + 2
  2. Excess Liquidity = 1 + 2 - 3

I've never used these, but in easy language functions that reference things like this are

Beginning Day Basis
  • GetBDAccountEquity
  • GetBDAccountNetWorth
  • GetBDCashBalance
  • GetBDTradeEquity
Real Time Basis
  1. GetOpenOrderInitialMargin
  2. GetRTAccountEquity
  3. GetRTAccountNetWorth
  4. GetRTCashBalance
  5. GetRTInitialMargin
  6. GetRTMaintMargin
  7. GetRTRealizedPL
  8. GetRTTradeEquity
  9. GetRTUnrealizedPL

This is where I would start. Then write to a file using FileAppend , FastFileAppend, or Print(File(, separating each value with a ",", so it writes in a CSV format. I would write a single header row, then write to the file once per day (based on time of day) to the file with whatever details are useful.

I tried to add an example of FileAppend, but my code is too messy. Let me know if you would like an example.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #89 (permalink)
 
FastNCurious's Avatar
 FastNCurious 
saint louis MO
 
Experience: Intermediate
Platform: TradeStation
Trading: NQ, ES, YM, CL, GC
Posts: 149 since Oct 2017
Thanks Given: 95
Thanks Received: 177


SMCJB View Post
What does "settled account equity" mean?

Futures accounts normally have several values
  1. Mark to Market of Open Positions
  2. Cash
  3. Margin Requirement of Open Positions
Which leads to
  1. Account Value / Net Equity = 1 + 2
  2. Excess Liquidity = 1 + 2 - 3

I've never used these, but in easy language functions that reference things like this are

Beginning Day Basis
  • GetBDAccountEquity
  • GetBDAccountNetWorth
  • GetBDCashBalance
  • GetBDTradeEquity
Real Time Basis
  1. GetOpenOrderInitialMargin
  2. GetRTAccountEquity
  3. GetRTAccountNetWorth
  4. GetRTCashBalance
  5. GetRTInitialMargin
  6. GetRTMaintMargin
  7. GetRTRealizedPL
  8. GetRTTradeEquity
  9. GetRTUnrealizedPL


Settled account equity means checking RTaccount equity at a certain time of day each day; maybe after settlement around 3:16 central time and printing that data to file. But after reading your question I realized that these are the reserved words I was looking for.

Do you keep track of daily/weekly account equity yourself? Do you know of some other way that is easier to visualize account equity over time other than printing to excel.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #90 (permalink)
 
FastNCurious's Avatar
 FastNCurious 
saint louis MO
 
Experience: Intermediate
Platform: TradeStation
Trading: NQ, ES, YM, CL, GC
Posts: 149 since Oct 2017
Thanks Given: 95
Thanks Received: 177



SMCJB View Post
What does "settled account equity" mean?

Futures accounts normally have several values
  1. Mark to Market of Open Positions
  2. Cash
  3. Margin Requirement of Open Positions
Which leads to
  1. Account Value / Net Equity = 1 + 2
  2. Excess Liquidity = 1 + 2 - 3

I've never used these, but in easy language functions that reference things like this are

Beginning Day Basis
  • GetBDAccountEquity
  • GetBDAccountNetWorth
  • GetBDCashBalance
  • GetBDTradeEquity
Real Time Basis
  1. GetOpenOrderInitialMargin
  2. GetRTAccountEquity
  3. GetRTAccountNetWorth
  4. GetRTCashBalance
  5. GetRTInitialMargin
  6. GetRTMaintMargin
  7. GetRTRealizedPL
  8. GetRTTradeEquity
  9. GetRTUnrealizedPL


So here is what I have written now but I am getting an unknown identifier.

 
Code
If time =1516 then begin

Print(date, time, getrtaccountequity(strAccountNumber);

end;

I tried putting my actual account number in there but it didn't work either. If anyone knows the answer to this issue please post it here.

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on November 11, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts