NexusFi: Find Your Edge


Home Menu

 





Store lowest tick since entry in variable


Discussion in EasyLanguage Programming

Updated
    1. trending_up 5,683 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread

Store lowest tick since entry in variable

  #11 (permalink)
Learningeasy
Amsterdam, Noord-Holland, Netherlands
 
Posts: 6 since May 2020
Thanks Given: 4
Thanks Received: 0


numberjuani View Post
maybe (entryprice - maxpositionloss/bigpointvalue)

Hmmm, I didn't get this to work. It flips to a wrong value when EntryPrice - MaxPointLoss isn't 0. Or am I overlooking something?




Your other solution, with...

If BarsSinceEntry < MaxBarsBack Then LowestPrice = Lowest(L, BarsSinceEntry);

...worked really perfect, except that it would only be able to keep a lowestprice as long as the MaxBarsBack was set to. And if I tried to set that Max higher, like 1000 or more, the strategy didn't execute.




I tried to work with LowestArray, as such...

HTML Code:
Variables: 
      Count(0),
      LowestPrice(0);

If Close < EntryPrice Then
     Count = Count + 1;
Array: LowPricesArray[](EntryPrice);
Array_SetMaxIndex(LowPricesArray, Count);
LowPricesArray[Count] = Close;

LowestPrice = LowestArray(LowPricesArray, Count);
...however, it seems that LowestArray returns a wrong value. Any ideas as to what I'm getting wrong here?

Really appreciate your help!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
26 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
20 thanks
  #12 (permalink)
 
Sandpaddict's Avatar
 Sandpaddict 
Vancouver, Canada
 
Experience: Advanced
Platform: Ninjatrader, MT4
Broker: IB, Global Prime
Trading: Futures CFDs
Posts: 684 since Mar 2020
Thanks Given: 975
Thanks Received: 637


Learningeasy View Post
Hi Sandpaddict, thanks for your reply. I tried that as well, but if I set the MaxBarsBack too high the strategy doesn't execute. When I read about the reserved word MaxBarsBack in the EasyLanguage reference, I don't really understand why, though.

Hi again Learningeasy.

I haven't used Tradestation in some years now but my first question to myself was why would your strategy not execute? Then I remembered I had a similar issue...

I have no idea if it's the same problem and I don't remember why it was but if you set your MaxBarsBack TOO FAR BACK yes you'll have issues like 10,000 or whatever. But if you try at like 1950 it might work.

****UPDATE****
Your code still can't call farther that that 1950 in this case as well! That tripped me up.
*****************

Again I have no idea if this will work for you but hopefully! And test those numbers for sure. Those just came to mind first.

Please let me know




Sent using the NexusFi mobile app

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on June 1, 2020


© 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