Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

aaa

Members
  • Content Count

    466
  • Joined

  • Last visited

Everything posted by aaa

  1. Bingo This one matches perfectly with Excel PP = Round( 2 * ( DailyHigh + DailyLow + ClotCompense ) / 3 , 0 ) / 2 R1 = Round( 2 * ( 2 * ( DailyHigh + DailyLow + ClotCompense ) / 3 - DailyLow ) , 0 ) / 2 ; R2 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 + Range ) , 0 ) / 2 ; R3 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 + Range + Range ) , 0 ) / 2 ; R4 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 + Range + Range + Range ) , 0 ) / 2 ; S1 = Round( 2 * ( 2 * ( DailyHigh + DailyLow + ClotCompense ) / 3 - DailyHigh ) , 0 ) / 2 ; S2 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 - Range ) , 0 ) / 2 ; S3 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 - Range - Range ) , 0 ) / 2 ; S4 = Round( 2 * ( ( DailyHigh + DailyLow + ClotCompense ) / 3 - Range - Range - Range ) , 0 ) / 2 ;
  2. I think that it was coded with MultiCharts and that this function doesn't work with TS
  3. I think that it's because it computes 2 rounds PP is rounded then used to compute S1 wich is also rounded The same for the others Pivots
  4. I have the same wrong result with my method I trust more Excel because it's so simple I notice that from PP to R4 is correct Strange But from S1 to S4 is wrong (half a point) R1 = RoundFraction( 2 * PP - DailyLow ) + IntPortion( 2 * PP - DailyLow ) ; R2 = RoundFraction( PP + Range ) + IntPortion( PP + Range ) ; R3 = RoundFraction( R2 + Range ) + IntPortion( R2 + Range ) ; R4 = RoundFraction( R3 + Range ) + IntPortion( R3 + Range ) ; S1 = RoundFraction( 2 * PP - DailyHigh ) + IntPortion( 2 * PP - DailyHigh ) ; S2 = RoundFraction( PP - Range ) + IntPortion( PP - Range ) ; S3 = RoundFraction( S2 - Range ) + IntPortion( S2 - Range ) ; S4 = RoundFraction( S3 - Range ) + IntPortion( S3 - Range ) ;
  5. The results of the Pivots doesn't match with Excel... R1 = Round( 2 * ( 2 * PP - DailyLow ), 0 ) / 2 ; R2 = Round( 2 * ( PP + Range ) , 0 ) / 2 ; R3 = Round( 2 * ( R2 + Range ) , 0 ) / 2 ; R4 = Round( 2 * ( R3 + Range ) , 0 ) / 2 ; S1 = Round( 2 * ( 2 * PP - DailyHigh ) , 0 ) / 2 ; S2 = Round( 2 * ( PP - Range ) , 0 ) / 2 ; S3 = Round( 2 * ( S2 - Range ) , 0 ) / 2 ; S4 = Round( 2 * ( S3 - Range ) , 0 ) / 2 ;
  6. Does this Fibonacci code works for evrybody or am I the only stupid blonde from this forum ?
  7. And to all the others from this great coding forum of course !
  8. Thanx to Sevensa and BlowFish to light the first steps of beginners.
  9. I am so stupid... I don't arrive...
  10. text_setstring(id.tl.Dynamic_R, text(Dynamic_R)); text_setstring(id.tl.xFib0.764, text(xFib0.764)); text_setstring(id.tl.xFib0.618, text(xFib0.618));
  11. //---------------------------------------------------------------- // show dash //---------------------------------------------------------------- //---------------------------------------------------------------- variables: //---------------------------------------------------------------- id.tl.Dynamic_R(-1), id.tl.xFib0.764(-1), id.tl.xFib0.618(-1), id.tl.xFib0.500(-1), id.tl.xFib0.382(-1), id.tl.xFib0.236(-1), id.tl.Dynamic_S(-1), right.time(0); right.time = DateTime2ELTime( getappinfo(airightdispdatetime)); if Show.Dash <> 0 then begin if currentbar = 1 then begin id.tl.Dynamic_R = tl_new( d, right.time {- barinterval * dash.length}, Dynamic_R, d, right.time, Dynamic_R); id.tl.xFib0.764 = tl_new( d, right.time - barinterval * dash.length, xFib0.764, d, right.time, xFib0.764); id.tl.xFib0.618 = tl_new( d, right.time - barinterval * dash.length, xFib0.618, d, right.time, xFib0.618); id.tl.xFib0.500 = tl_new( d, right.time - barinterval * dash.length, xFib0.500, d, right.time, xFib0.500); id.tl.xFib0.382 = tl_new( d, right.time - barinterval * dash.length, xFib0.382, d, right.time, xFib0.382); id.tl.xFib0.236 = tl_new( d, right.time - barinterval * dash.length, xFib0.236, d, right.time, xFib0.236); id.tl.Dynamic_S = tl_new( d, right.time - barinterval * dash.length, Dynamic_S, d, right.time, Dynamic_S); tl_setcolor(id.tl.Dynamic_R, HighColor ); tl_setcolor(id.tl.xFib0.764, Fib0.764Color); tl_setcolor(id.tl.xFib0.618, Fib0.618Color); tl_setcolor(id.tl.xFib0.500, Fib0.500Color); tl_setcolor(id.tl.xFib0.382, Fib0.382Color); tl_setcolor(id.tl.xFib0.236, Fib0.236Color); tl_setcolor(id.tl.Dynamic_S, Lowcolor ); tl_setSize(id.tl.Dynamic_R, High.Size ); tl_setSize(id.tl.xFib0.764, Fib0.764Size ); tl_setSize(id.tl.xFib0.618, Fib0.618Size ); tl_setSize(id.tl.xFib0.500, Fib0.500Size ); tl_setSize(id.tl.xFib0.382, Fib0.382Size ); tl_setSize(id.tl.xFib0.236, Fib0.236Size ); tl_setSize(id.tl.Dynamic_S, Low.Size ); tl_setStyle(id.tl.Dynamic_R, High.Style ); tl_setStyle(id.tl.xFib0.764, Fib0.764Style); tl_setStyle(id.tl.xFib0.618, Fib0.618Style); tl_setStyle(id.tl.xFib0.500, Fib0.500Style); tl_setStyle(id.tl.xFib0.382, Fib0.382Style); tl_setStyle(id.tl.xFib0.236, Fib0.236Style); tl_setStyle(id.tl.Dynamic_S, Low.Style ); end; tl_setbegin(id.tl.Dynamic_R, d, right.time - barinterval * dash.length, Dynamic_R); tl_setbegin(id.tl.xFib0.764, d, right.time - barinterval * dash.length, xFib0.764); tl_setbegin(id.tl.xFib0.618, d, right.time - barinterval * dash.length, xFib0.618); tl_setbegin(id.tl.xFib0.500, d, right.time - barinterval * dash.length, xFib0.500); tl_setbegin(id.tl.xFib0.382, d, right.time - barinterval * dash.length, xFib0.382); tl_setbegin(id.tl.xFib0.236, d, right.time - barinterval * dash.length, xFib0.236); tl_setbegin(id.tl.Dynamic_S, d, right.time - barinterval * dash.length, Dynamic_S); tl_setend(id.tl.Dynamic_R, d, right.time, Dynamic_R); tl_setend(id.tl.xFib0.764, d, right.time, xFib0.764); tl_setend(id.tl.xFib0.618, d, right.time, xFib0.618); tl_setend(id.tl.xFib0.500, d, right.time, xFib0.500); tl_setend(id.tl.xFib0.382, d, right.time, xFib0.382); tl_setend(id.tl.xFib0.236, d, right.time, xFib0.236); tl_setend(id.tl.Dynamic_S, d, right.time, Dynamic_S); end; //---------------------------------------------------------------- // show number //---------------------------------------------------------------- //---------------------------------------------------------------- variables: //---------------------------------------------------------------- id.text.Dynamic_R(-1), id.text.xFib0.764(-1), id.text.xFib0.618(-1), id.text.xFib0.500(-1), id.text.xFib0.382(-1), id.text.xFib0.236(-1), id.text.Dynamic_S(-1); if Show.number <> 0 then begin if currentbar = 1 then begin id.text.Dynamic_R = text_new( d, right.time, Dynamic_R, text(Dynamic_R)); id.text.xFib0.764 = text_new( d, right.time, xFib0.764, text(xFib0.764)); id.text.xFib0.618 = text_new( d, right.time, xFib0.618, text(xFib0.618)); id.text.xFib0.500 = text_new( d, right.time, xFib0.500, text(xFib0.500)); id.text.xFib0.382 = text_new( d, right.time, xFib0.382, text(xFib0.382)); id.text.xFib0.236 = text_new( d, right.time, xFib0.236, text(xFib0.236)); id.text.Dynamic_S = text_new( d, right.time, Dynamic_S, text(Dynamic_S)); text_setSize(id.text.Dynamic_R, NbreSize); text_setSize(id.text.xFib0.764, NbreSize); text_setSize(id.text.xFib0.618, NbreSize); text_setSize(id.text.xFib0.500, NbreSize); text_setSize(id.text.xFib0.382, NbreSize); text_setSize(id.text.xFib0.236, NbreSize); text_setSize(id.text.Dynamic_S, NbreSize); text_setcolor(id.text.Dynamic_R, NbreColor ); text_setcolor(id.text.xFib0.764, NbreColor ); text_setcolor(id.text.xFib0.618, NbreColor ); text_setcolor(id.text.xFib0.500, NbreColor ); text_setcolor(id.text.xFib0.382, NbreColor ); text_setcolor(id.text.xFib0.236, NbreColor ); text_setcolor(id.text.Dynamic_S, NbreColor ); text_setstyle(id.text.Dynamic_R, 1,1 ); text_setstyle(id.text.xFib0.764, 1,1 ); text_setstyle(id.text.xFib0.618, 1,1 ); text_setstyle(id.text.xFib0.500, 1,1 ); text_setstyle(id.text.xFib0.382, 1,1 ); text_setstyle(id.text.xFib0.236, 1,1 ); text_setstyle(id.text.Dynamic_S, 1,1 ); end; text_setstring(id.tl.Dynamic_R, text(Dynamic_R)); text_setstring(id.tl.xFib0.764, text(xFib0.764)); text_setstring(id.tl.xFib0.618, text(xFib0.618)); text_setstring(id.tl.xFib0.500, text(xFib0.500)); text_setstring(id.tl.xFib0.382, text(xFib0.382)); text_setstring(id.tl.xFib0.236, text(xFib0.236)); text_setstring(id.tl.Dynamic_S, text(Dynamic_S)); text_setlocation(id.tl.Dynamic_R, d, right.time, Dynamic_R); text_setlocation(id.tl.xFib0.764, d, right.time, xFib0.764); text_setlocation(id.tl.xFib0.618, d, right.time, xFib0.618); text_setlocation(id.tl.xFib0.500, d, right.time, xFib0.500); text_setlocation(id.tl.xFib0.382, d, right.time, xFib0.382); text_setlocation(id.tl.xFib0.236, d, right.time, xFib0.236); text_setlocation(id.tl.Dynamic_S, d, right.time, Dynamic_S); end;
  12. fgdfgfdgdfgdfgfdgfgdfgfdgdfgdfgdfgdfgdfg
  13. fdgdfgdfgfdgfdgdfggfdgdfgdfg
  14. ----------------- how to do that ?
  15. I don't know why the site insert a space here id.text.Dyna mic in my code there is no space of course
  16. Here is the code I use //---------------------------------------------------------------- // show number //---------------------------------------------------------------- //---------------------------------------------------------------- variables: //---------------------------------------------------------------- id.text.Dynamic_R(-1), id.text.xFib0.764(-1), id.text.xFib0.618(-1), id.text.xFib0.500(-1), id.text.xFib0.382(-1), id.text.xFib0.236(-1), id.text.Dynamic_S(-1); if Show.number <> 0 then begin if currentbar = 1 then begin id.text.Dynamic_R = text_new( d, right.time, Dynamic_R, text(Dynamic_R)); id.text.xFib0.764 = text_new( d, right.time, xFib0.764, text(xFib0.764)); id.text.xFib0.618 = text_new( d, right.time, xFib0.618, text(xFib0.618)); id.text.xFib0.500 = text_new( d, right.time, xFib0.500, text(xFib0.500)); id.text.xFib0.382 = text_new( d, right.time, xFib0.382, text(xFib0.382)); id.text.xFib0.236 = text_new( d, right.time, xFib0.236, text(xFib0.236)); id.text.Dynamic_S = text_new( d, right.time, Dynamic_S, text(Dynamic_S)); text_setSize(id.text.Dynamic_R, NbreSize); text_setSize(id.text.xFib0.764, NbreSize); text_setSize(id.text.xFib0.618, NbreSize); text_setSize(id.text.xFib0.500, NbreSize); text_setSize(id.text.xFib0.382, NbreSize); text_setSize(id.text.xFib0.236, NbreSize); text_setSize(id.text.Dynamic_S, NbreSize); text_setcolor(id.text.Dynamic_R, NbreColor ); text_setcolor(id.text.xFib0.764, NbreColor ); text_setcolor(id.text.xFib0.618, NbreColor ); text_setcolor(id.text.xFib0.500, NbreColor ); text_setcolor(id.text.xFib0.382, NbreColor ); text_setcolor(id.text.xFib0.236, NbreColor ); text_setcolor(id.text.Dynamic_S, NbreColor ); text_setstyle(id.text.Dynamic_R, 1,1 ); text_setstyle(id.text.xFib0.764, 1,1 ); text_setstyle(id.text.xFib0.618, 1,1 ); text_setstyle(id.text.xFib0.500, 1,1 ); text_setstyle(id.text.xFib0.382, 1,1 ); text_setstyle(id.text.xFib0.236, 1,1 ); text_setstyle(id.text.Dynamic_S, 1,1 ); end; text_setstring(id.tl.Dynamic_R, text(Dynamic_R)); text_setstring(id.tl.xFib0.764, text(xFib0.764)); text_setstring(id.tl.xFib0.618, text(xFib0.618)); text_setstring(id.tl.xFib0.500, text(xFib0.500)); text_setstring(id.tl.xFib0.382, text(xFib0.382)); text_setstring(id.tl.xFib0.236, text(xFib0.236)); text_setstring(id.tl.Dynamic_S, text(Dynamic_S)); text_setlocation(id.tl.Dynamic_R, d, right.time, Dynamic_R); text_setlocation(id.tl.xFib0.764, d, right.time, xFib0.764); text_setlocation(id.tl.xFib0.618, d, right.time, xFib0.618); text_setlocation(id.tl.xFib0.500, d, right.time, xFib0.500); text_setlocation(id.tl.xFib0.382, d, right.time, xFib0.382); text_setlocation(id.tl.xFib0.236, d, right.time, xFib0.236); text_setlocation(id.tl.Dynamic_S, d, right.time, Dynamic_S); end;
  17. Thanx Tams for your answer I use it in minute chart= 1 5 15 60 240 and it is erratic... If I enter 8 (Right margin = 8) it is only a dot or 3 bars long ligne Then I change in ex 44 I have a long line Then I change back to 8 and I have a 8 bars ligne I can manage it but the main problem is that I have no number at all
  18. // RoundFraction // Version 1.00 by SEVENSA // Version 1.01 // minor changes in the formula // Date: 20090320 //----------------------------------------------------- inputs: //---------------------------------------------------- Number(NumericSimple); //---------------------------------------------------------------- variables: //---------------------------------------------------------------- Fraction(0); Fraction = FracPortion(Number); If Fraction >= 0 and Fraction < 0.25 then RoundFraction = 0; If Fraction >= 0.25 and Fraction < 0.75 then RoundFraction = 0.5; If Fraction >= 0.75 then RoundFraction = 1; { vars: val1(20.2), val2(20.4), val3(20.8), Result(0); {Result = 20.0)} Result = RoundFraction(val1) + IntPortion(val1); Print("Result = ", Result); {Result = 20.5)} Result = RoundFraction(val2) + IntPortion(val1); Print("Result = ", Result); {Result = 21)} Result = RoundFraction(val3) + IntPortion(val1); Print("Result = ", Result); }
  19. ThanX SEVENSA I appreciate your help and I hope that this function will be usefull for the community For me it is exactly what I was looking for a while
  20. Also I'd like to have the lignes in the empty right side of the chart So if Right margin = 8 Dash.length( 8 ), Well sometimes I have no lignes and when I put a nber like 66 I have them and after a while they desappear The code looks great anyway
  21. I have problems with the numbers Most of the time there are invisible In 5 mn they appears sometimes Is there an other way to code the numbers like in the pivots ? variables: right.time(0), id.text.Dynamic_R(-1); right.time = DateTime2ELTime( getappinfo(airightdispdatetime)); if currentbar = 1 then begin id.text.Dynamic_R = text_new( d, right.time, Dynamic_R, text(Dynamic_R)); end; text_setstring(id.tl.Dynamic_R, text(Dynamic_R)); text_setlocation(id.tl.Dynamic_R, d, right.time, Dynamic_R);
  22. I'm wondering if it is possible to make a function called RoundFraction Pseudo Code if decimal >= .00 and < .024 then decimal = 0 if decimal >= .25 and < .074 then decimal = 0.5 if decimal >= .75 and < 1.0 then decimal = 0 and number +1 If someone knows how to code that it'll be very kind.
  23. it is because I always have to choose quickly when I buy or sell If I round to 0 I miss the half or I pay half more... I hope that I'm clear enough...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.