Power Language Takes so long to load and calculate - EasyLanguage Programming | futures io social day trading
futures io futures trading


Power Language Takes so long to load and calculate
Updated: Views / Replies:603 / 4
Created: by risaldeb Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Power Language Takes so long to load and calculate

  #1 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: Options
 
Posts: 10 since Feb 2015
Thanks: 1 given, 0 received

Power Language Takes so long to load and calculate

After loading the The power language below into multicharts it took forever to calculate and load. I wonder what went wrong. Please help... THanks.


[IntraBarOrderGeneration=TRUE]

Input:

TradeCost (1000),
TradeTimeStart (0900),
TradeTimeEnd (1500),
AccFactorStep( 0.14 ),
AccFactorLimit( 0.2 ),
BreakEvenPct (10),
StopLossPct (10),
dailyloss (3000),
DMIP (14),
ADXlen (14);

Variables:

TradeOK (false), //Trade
TrdQty (0), // Number of Contracts
StopAmt (0),
ActualCost (0),
EntryPrice (0),
Position (0),
//SetBreakEven (0),
FloorAmt (0),
//SetStopLoss (0),
Value1 (0),
Value2(0),
Value3 (0),
todaynet (0),
yesterdaynet (0),

oParCl( 0 ), oParOp( 0 ), oPosition( 0 ), oTransition( 0 ) ;

Value1 = ParabolicSAR( AccFactorStep, AccFactorLimit, oParCl, oParOp, oPosition, oTransition ) ;
Value2 = ADX(ADXlen);
Value3 = DMIPlus (DMIP);

// TrdQty = IntPortion(TradeCost/(100*Close));// Round off the entry contracts.
Position = IntPortion(TradeCost/(100*EntryPrice)); //Actual Position Contracts.
ActualCost = Position * EntryPrice * 100;
StopAmt = ActualCost * StopLossPct/100;

FloorAmt = ActualCost * (BreakEvenPct/100);

{Determine if current time is within valid market session by setting
the TradeOK to TRUE which will allow new position to be opened (traderslaboratory.com)}

if (Time > TradeTimeStart) AND (Time < TradeTimeEnd) then
TradeOK = True;

If date <> date [1] then begin
yesterdaynet = NetProfit;
end;
if MarketPosition = 0 then begin
todaynet = NetProfit - yesterdaynet;
condition1 = -dailyloss < todaynet;

// Buy if SAR -1, DMI >15

If (TradeOK) And (MarketPosition=0) And (oPosition = -1)
And (Value2>15) And (Value3 >20) And (condition1 = True) Then Begin

Buy ( "Buy-SAR" ) Next Bar {TrdQty Contracts} at Market;

// Set Stops.
//SetStopPosition;
SetStopLoss(StopAmt);
SetBreakEven (FloorAmt);

End;


// Sell for Profit if SAR = +1

If (MarketPosition=1) And (oPosition = 1) Then Begin

Sell ( "Sell" ) Next Bar at Market;

End;



If (TradeOK = False) And (MarketPosition=1) Then Begin
Sell ( "SellTime" ) Next Bar at Market;
End;
End;

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: Options
 
Posts: 10 since Feb 2015
Thanks: 1 given, 0 received


I hope someone will reply please.

Reply With Quote
 
  #4 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received


risaldeb View Post
I hope someone will reply please.

Your "EntryPrice" variable is causing a division by zero error Set the initial variable value to something other than "(0)". then maybe add something like:
 
Code
if entryprice = 0 then EntryPrice = EntryPrice[1];
Honestly, i have no idea what your trying to do with the code but that's the first thing that jumped out at me.
Also, you will get alot more help at Multicharts discussion Forum
hope this helps you, good luck.

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,524 since Apr 2013
Thanks: 229 given, 852 received
Forum Reputation: Legendary

risaldeb,

what makes it very hard to help you is the amount of information you provided besides your script.
For example what does "forever" mean - seconds, minutes, hours... eternity? How many days of data did you load on what symbol and timeframe? What were your settings for the bar magnifier? There are so many variables that could explain why code took a while to calculate. With your code not being overly complex I would expect the reason to be somewhere to be found within the points I mentioned.

Regards,
ABCTG

Reply With Quote

Reply



futures io > > > > > Power Language Takes so long to load and calculate

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forbes Markets Rewind: Twitter Takes Flight, Tesla Takes A Break Quick Summary News and Current Events 0 November 9th, 2013 10:40 AM
Portable AC solar power generator and backup power Cloudy Tech Support 0 July 19th, 2013 06:29 AM
Workspaces taking too long to load flipper26 NinjaTrader 6 November 20th, 2012 05:42 PM
MEF Entry/Exit Causes Long Chart Load Time reedstickets NinjaTrader 5 October 9th, 2011 09:30 PM
Goldman Takes Long View over Payouts Quick Summary News and Current Events 0 December 24th, 2010 11:30 AM


All times are GMT -4. The time now is 11:40 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-11 in 0.10 seconds with 19 queries on phoenix via your IP 54.82.81.154